Skip to content

Instantly share code, notes, and snippets.

@pjoe
Created October 7, 2020 19:59
Show Gist options
  • Save pjoe/e15129eb12109e4ed9fe189b599f3bb5 to your computer and use it in GitHub Desktop.
Save pjoe/e15129eb12109e4ed9fe189b599f3bb5 to your computer and use it in GitHub Desktop.
jupyter linux docker gpu
#!/usr/bin/bash
docker build -t jupyter-lab-gpu .
FROM tensorflow/tensorflow:latest-gpu-py3-jupyter
# RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
# && apt-get install -y nodejs \
# && rm -rf /var/lib/apt/lists/*
RUN pip install -U \
jupyter \
jupyterlab \
pandas
# jupyter_tensorboard \
#RUN jupyter labextension install \
# jupyterlab_tensorboard
ENV SHELL=/bin/bash
CMD ["bash", "-c", \
"source /etc/bash.bashrc && jupyter lab --notebook-dir=/tf --ip 0.0.0.0 --no-browser --allow-root"]
#!/usr/bin/bash
#IMG=jupyter/tensorflow-notebook:latest
#IMG=tensorflow/tensorflow:latest-gpu-py3-jupyter
#IMG=cschranz/gpu-jupyter:latest
IMG=jupyter-lab-gpu
#WORKDIR=/home/jovyan
WORKDIR=/tf
docker run \
--rm \
-it \
--gpus all \
-p 8888:8888 \
-p 6006:6006 \
-e JUPYTER_ENABLE_LAB=yes \
-e GRANT_SUDO=yes \
--user root \
-v "$PWD:$WORKDIR" \
--name jupyter \
$IMG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment