Skip to content

Instantly share code, notes, and snippets.

@takezoe
Last active April 29, 2023 05:50
Show Gist options
  • Save takezoe/7910f9f14e50265fe65e2ddf2aa01c90 to your computer and use it in GitHub Desktop.
Save takezoe/7910f9f14e50265fe65e2ddf2aa01c90 to your computer and use it in GitHub Desktop.
Run JupyterLab on Docker

Run JupyterLab on docker

https://hub.docker.com/r/jupyter/scipy-notebook/

$ docker pull jupyter/scipy-notebook

$ docker run -v `pwd`:/home/jovyan/work -p 10000:8888 --name jupyter jupyter/scipy-notebook
...
    To access the server, open this file in a browser:
        file:///home/jovyan/.local/share/jupyter/runtime/jpserver-8-open.html
    Or copy and paste one of these URLs:
        http://32d91455c145:8888/lab?token=xxxx
        http://127.0.0.1:8888/lab?token=xxxx

Then, open http://localhost:10000 with the browser and enter the token.

Start and stop the docker container:

$ docker start jupyter
$ docker stop jupyter

To confirm the token, enter the docker container and run jupyter lab list:

$ docker exec -it jupyter bash

$ jupyter lab list
[JupyterServerListApp] Currently running servers:
[JupyterServerListApp] http://2a5133ff908b:8888/?token=xxxx :: /home/jovyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment