Skip to content

Instantly share code, notes, and snippets.

@allanbatista
Last active August 18, 2018 15:55
Show Gist options
  • Save allanbatista/b2289312e322b280174eecf712578e33 to your computer and use it in GitHub Desktop.
Save allanbatista/b2289312e322b280174eecf712578e33 to your computer and use it in GitHub Desktop.
Start Jupyter notebook on docker to developer with volume mounted

Start Jupyter notebook on docker to developer with volume mounted

$ mkdir $HOME/workspace/notebooks -p && \
  docker run -d -p 8888:8888 --restart unless-stopped --name jupyter -v $HOME/workspace/notebooks:/notebooks tensorflow/tensorflow:latest-gpu

To GET a token, not forgot to see jupyter logs.

$ docker logs jupyter

Output

[I 15:50:00.152 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
[W 15:50:00.164 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 15:50:00.171 NotebookApp] Serving notebooks from local directory: /notebooks
[I 15:50:00.171 NotebookApp] The Jupyter Notebook is running at:
[I 15:50:00.171 NotebookApp] http://(6c025e77d456 or 127.0.0.1):8888/?token=afd9f1688c273dd6022473f264665f12537932ce20df9f57
[I 15:50:00.171 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 15:50:00.171 NotebookApp] 
    
    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://(6c025e77d456 or 127.0.0.1):8888/?token=afd9f1688c273dd6022473f264665f12537932ce20df9f57
[I 15:50:09.022 NotebookApp] 302 GET / (172.17.0.1) 0.94ms
[I 15:50:09.034 NotebookApp] 302 GET /tree? (172.17.0.1) 1.20ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment