How do I start tensorflow docker jupyter notebook

后端 未结 10 2071
时光说笑
时光说笑 2020-12-07 09:15

I\'ve installed the tensorflow docker container on an ubuntu machine. The tensorflow docker setup instructions specify:

docker run -it b.gcr.io/tensorflow/t         


        
10条回答
  •  既然无缘
    2020-12-07 10:09

    My simple yet efficient workflow:

    TL;DR version:

    1. Open Docker Quickstart Terminal. If it is already open, run $ cd
    2. Run this once: $ docker run -it -p 8888:8888 -p 6006:6006 -v /$(pwd)/tensorflow:/notebooks --name tf b.gcr.io/tensorflow/tensorflow
    3. To start every time: $ docker start -i tf

    If you are not on windows, you should probably change /$(pwd) to $(pwd)

    You will get an empty folder named tensorflow in your home directory for use as a persistent storage of project files such as Ipython Notebooks and datasets.

    Explanation:

    1. cd for making sure you are in your home directory.
    2. params:
      • -it stands for interactive, so you can interact with the container in the terminal environment.
      • -v host_folder:container_folder enables sharing a folder between the host and the container. The host folder should be inside your home directory. /$(pwd) translates to //c/Users/YOUR_USER_DIR in Windows 10. This folder is seen as notebooks directory in the container which is used by Ipython/Jupyter Notebook.
      • --name tf assigns the name tf to the container.
      • -p 8888:8888 -p 6006:6006 mapping ports of container to host, first pair for Jupyter notebook, the second one for Tensorboard
    3. -i stands for interactive

    Running TensorFlow on the cloud

提交回复
热议问题