Skip to content

Instantly share code, notes, and snippets.

@hideojoho
Created September 11, 2019 01:27
Show Gist options
  • Save hideojoho/504a03b49d40d1bf3a69e04f4b973f44 to your computer and use it in GitHub Desktop.
Save hideojoho/504a03b49d40d1bf3a69e04f4b973f44 to your computer and use it in GitHub Desktop.
How to start a JupyterLab on Docker
sudo docker build -t jupyterlab:latest ./
FROM jupyter/datascience-notebook
RUN pip install --upgrade pip
RUN pip install jupyterlab
RUN jupyter serverextension enable --py jupyterlab

How to start a JupyterLab on Docker

Assuming that you have installed Docker already and you have an access to bash.

First time only

Second time onwards

  • Run run.sh

File Sync

  • If you save files in work folder, it should sync
sudo docker run --rm -it \
jupyter/datascience-notebook /bin/bash -c \
"python -c 'from notebook.auth import passwd;print(passwd())'"
sudo docker run \
--rm \
-e TZ=Asia/Tokyo \
-p 8888:8888 \
--name jupyterlab \
-v "$(pwd)/work:/home/jovyan/work" \
jupyterlab:latest \
start.sh jupyter lab --NotebookApp.password="YOUR SHA KEY"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment