TensorFlow in Docker
From ESS-WIKI
Introduction
- Google has uploaded tensorflow docker image on docker hub. link: Tensorflow Docker Hub
- There are two docker images:
- tensorflow:latest: CPU only.
- tensorflow:latest-gpu: GPU support.
Run tensorflow docker with Jupyter
- Google already include the Jupyter server in tensorflow docker image, so you can access Juypter right after docker image is running.
- Steps:
1. run tensorflow docker
$ docker run --runtime=nvidia -it -p 8888:8888 tensorflow/tensorflow:latest
[I 08:28:43.049 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
[W 08:28:43.310 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 08:28:43.417 NotebookApp] Serving notebooks from local directory: /notebooks
[I 08:28:43.417 NotebookApp] The Jupyter Notebook is running at:
[I 08:28:43.417 NotebookApp] http://(0f31f84fe6a2 or 127.0.0.1):8888/?token=a02fb2dfea3bf6ea7389bf92ec575906805502b584b2d149
[I 08:28:43.418 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 08:28:43.418 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://(0f31f84fe6a2 or 127.0.0.1):8888/?token=a02fb2dfea3bf6ea7389bf92ec575906805502b584b2d149
2. You can open Juypter editor by browser
- http://(0f31f84fe6a2 or 127.0.0.1):8888/?token=a02fb2dfea3bf6ea7389bf92ec575906805502b584b2d149