Created
April 16, 2020 20:11
-
-
Save jdob/2887c1b6d318c36212c27f55c688c11e to your computer and use it in GitHub Desktop.
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 centos/python-36-centos7:latest | |
EXPOSE 8888 | |
# User setup for OpenShift | |
USER root | |
ENV HOME=/jupyter | |
RUN mkdir -p ${HOME}/notebooks && \ | |
useradd -u 9000 -r -g 0 -d ${HOME} -s /sbin/nologin \ | |
-c "Jupyter User" jupyter-user | |
WORKDIR ${HOME} | |
# Python dependencies | |
RUN pip install --upgrade pip && \ | |
pip install qiskit jupyter | |
# Specific notebook configuration | |
ADD jupyter_notebook_config.py ${HOME}/jupyter_notebook_config.py | |
ADD playground.ipynb ${HOME}/notebooks/playground.ipynb | |
RUN chown -R 9000:0 ${HOME} && \ | |
find ${HOME} -type d -exec chmod g+ws {} \; | |
WORKDIR ${HOME}/notebooks | |
# Run the notebook | |
USER 1001 | |
CMD ["jupyter", "notebook", "--config", "/jupyter/jupyter_notebook_config.py"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment