Last active
January 16, 2020 00:18
-
-
Save GzuPark/941e34ed2ab68a40267827947eb93a44 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 nvidia/cuda:10.0-cudnn7-devel-ubuntu16.04 | |
RUN apt-get update && apt-get install -y curl | |
RUN curl -sSL http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/miniconda.sh && \ | |
bash /tmp/miniconda.sh -bfp /usr/local && \ | |
rm -rf /tmp/miniconda.sh | |
RUN conda update -y conda | |
RUN conda install -q -y pyyaml mkl mkl-include setuptools cmake cffi typing ipython | |
RUN conda install -q -y jupyterlab nodejs | |
RUN pip install bokeh pynvml | |
RUN pip install jupyterlab-nvdashboard | |
RUN jupyter labextension install jupyterlab-nvdashboard | |
RUN jupyter serverextension enable --py jupyterlab --sys-prefix | |
RUN apt-get clean && rm -rf /var/lib/apt/lists/* | |
ARG JUPYTER_PASSWORD | |
RUN jupyter notebook --generate-config | |
RUN jupyter_sha=$(python -c "from notebook.auth import passwd; print(passwd('${JUPYTER_PASSWORD}'))") && \ | |
echo "c.NotebookApp.password=u'$jupyter_sha'" >> ~/.jupyter/jupyter_notebook_config.py && \ | |
echo "c.NotebookApp.ip='0.0.0.0'" >> ~/.jupyter/jupyter_notebook_config.py && \ | |
echo "c.NotebookApp.open_browser=False" >> ~/.jupyter/jupyter_notebook_config.py && \ | |
echo "c.NotebookApp.terminado_settings = { 'shell_command': ['bash'] }" >> ~/.jupyter/jupyter_notebook_config.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
build
docker build $IMAGE_NAME --build-arg $JUPYTER_PW .
run
docker run -it --runtime=nvidia --name $CONTAINER_NAME -p $PORT:$PORT $IMAGE_NAME /bin/bash