mango-explorer/Dockerfile

45 lines
1.9 KiB
Docker
Raw Normal View History

2021-04-14 08:51:39 -07:00
FROM jupyter/scipy-notebook:latest
USER root
RUN apt-get update && apt-get -y install jq curl libxml2-dev libxslt-dev libffi-dev zlib1g-dev
RUN curl -SL -o /var/tmp/pyston_2.2_20.04.deb https://github.com/pyston/pyston/releases/download/pyston_2.2/pyston_2.2_20.04.deb
RUN apt-get -y install /var/tmp/pyston_2.2_20.04.deb
RUN rm -f /var/tmp/pyston_2.2_20.04.deb
USER $NB_UID
2021-04-14 08:51:39 -07:00
COPY requirements.txt /tmp/
RUN pip install --requirement /tmp/requirements.txt && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER
RUN pip-pyston install --user --requirement /tmp/requirements.txt
2021-04-14 08:51:39 -07:00
# This is a nasty hack to fix a bug in pyserum when it tries to load the event queue.
RUN sed -i "s/Const(0, BitsInteger(4))/Padding(4)/g" /opt/conda/lib/python3.8/site-packages/pyserum/_layouts/queue.py
RUN sed -i "s/Const(0, BitsInteger(4))/Padding(4)/g" /home/jovyan/.local/lib/pyston3.8/site-packages/pyserum/_layouts/queue.py
2021-04-14 08:51:39 -07:00
# Create our profile directory.
RUN ipython profile create
# Install the extensions we want
RUN jupyter contrib nbextension install --user
RUN jupyter nbextension enable codefolding/edit && \
jupyter nbextension enable codefolding/main && \
jupyter nbextension enable highlighter/highlighter && \
jupyter nbextension enable select_keymap/main && \
jupyter nbextension enable toc2/main && \
jupyter nbextension enable varInspector/main
RUN jq '. += {"select_keymap_local_storage": false, "stored_keymap": "sublime"}' \
/home/jovyan/.jupyter/nbconfig/notebook.json > \
/home/jovyan/.jupyter/nbconfig/newnotebook.json && \
mv -f /home/jovyan/.jupyter/nbconfig/newnotebook.json /home/jovyan/.jupyter/nbconfig/notebook.json
2021-04-14 08:51:39 -07:00
# Copy across our magic/startup scripts.
COPY meta/startup /home/jovyan/.ipython/profile_default/startup
COPY meta/jupyter/custom /home/jovyan/.jupyter/custom
2021-04-14 08:51:39 -07:00
ENV PATH="/home/jovyan/work/bin:${PATH}:/home/jovyan/work/scripts"
2021-04-14 08:51:39 -07:00
ADD . /home/jovyan/work
WORKDIR /home/jovyan/work