Last active
November 16, 2022 22:16
-
-
Save behackl/a5d25c901ec557565f99331b130f09a2 to your computer and use it in GitHub Desktop.
sage binder test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM sagemath/sagemath:9.7 | |
ARG NB_UID=1000 | |
ARG NB_USER=sage | |
USER root | |
RUN apt update && apt install -y python3 python3-pip | |
USER ${NB_UID} | |
ENV PATH="${PATH}:${HOME}/.local/bin" | |
RUN pip3 install notebook | |
RUN ln -s $(sage -sh -c 'ls -d $SAGE_VENV/share/jupyter/kernels/sagemath') $HOME/.local/share/jupyter/kernels/sagemath-dev | |
# partially superfluous -- create separate directory to hold notebooks | |
WORKDIR ${HOME}/notebooks | |
COPY --chown=${NB_UID}:${NB_UID} . . | |
USER root | |
RUN chown -R ${NB_UID}:${NB_UID} . | |
USER ${NB_UID} | |
ENTRYPOINT [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment