2021-04-14 08:51:39 -07:00
|
|
|
FROM jupyter/scipy-notebook:latest
|
|
|
|
|
2021-04-22 06:28:32 -07:00
|
|
|
USER root
|
2021-05-06 11:06:47 -07:00
|
|
|
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
|
2021-04-22 06:28:32 -07:00
|
|
|
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
|
2021-05-06 11:06:47 -07:00
|
|
|
RUN pip-pyston install --user --requirement /tmp/requirements.txt
|
2021-04-14 08:51:39 -07:00
|
|
|
|
2021-05-04 09:18:09 -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
|
2021-05-08 08:01:30 -07:00
|
|
|
RUN sed -i "s/Const(0, BitsInteger(4))/Padding(4)/g" /home/jovyan/.local/lib/pyston3.8/site-packages/pyserum/_layouts/queue.py
|
2021-05-04 09:18:09 -07:00
|
|
|
|
2021-04-14 08:51:39 -07:00
|
|
|
# Create our profile directory.
|
|
|
|
RUN ipython profile create
|
|
|
|
|
2021-04-22 06:28:32 -07:00
|
|
|
# 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
|
2021-04-22 07:13:23 -07:00
|
|
|
COPY meta/jupyter/custom /home/jovyan/.jupyter/custom
|
2021-04-14 08:51:39 -07:00
|
|
|
|
2021-05-11 11:24:02 -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
|