Skip to content

Commit

Permalink
feat: Update Dockerfile.jupyter and remove the workaround.
Browse files Browse the repository at this point in the history
  • Loading branch information
andormarkus-alcd committed May 1, 2024
1 parent 297812e commit f542e7e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Dockerfile.jupyter
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,15 @@ RUN if [ "$dev_mode" = "true" ]; then \
cd sparkmagic && pip install -e . && cd ../ ; \
else pip install sparkmagic ; fi

# Jupyter extensions changed in >7.x.x
# For now (workaround), let's pin to 6 to avoid breaking things
# xref: https://github.com/jupyter-incubator/sparkmagic/issues/825
RUN pip install notebook==6.5.5

RUN mkdir /home/$NB_USER/.sparkmagic
COPY sparkmagic/example_config.json /home/$NB_USER/.sparkmagic/config.json
RUN sed -i 's/localhost/spark/g' /home/$NB_USER/.sparkmagic/config.json
RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension
RUN pip install ipywidgets
RUN jupyter-kernelspec install --user $(pip show sparkmagic | grep Location | cut -d" " -f2)/sparkmagic/kernels/sparkkernel
RUN jupyter-kernelspec install --user $(pip show sparkmagic | grep Location | cut -d" " -f2)/sparkmagic/kernels/pysparkkernel
RUN jupyter-kernelspec install --user $(pip show sparkmagic | grep Location | cut -d" " -f2)/sparkmagic/kernels/sparkrkernel
RUN jupyter serverextension enable --py sparkmagic
RUN jupyter server extension enable --py sparkmagic

USER root
RUN chown $NB_USER /home/$NB_USER/.sparkmagic/config.json
Expand Down

0 comments on commit f542e7e

Please sign in to comment.