Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show volume files in the GUI of Docker Jupyter notebook

I run Jupyter Notebook with Docker and trying to mount local directory onto the intended Docker volume. But I am unable to see my files in the Jupyter notebook. The Docker command is

sudo nvidia-docker create -v ~/tf/src -it -p 8888:8888 
   -e PASSWORD=password 
   --name container_name gcr.io/tensorflow/tensorflow:latest-gpu

and the GUI of the Jupyter Notebook looks like

Jupyter notebook

but ~/tf/src are not shown up in the Jupyter GUI.

What are needed for the files to shown up in the Jupyter? Am I initializing the container incorrectly for this?

like image 569
Karl L Avatar asked Jan 05 '18 05:01

Karl L


People also ask

How do I see files inside a Docker volume?

You can use the docker volume ls command to view a list of data volumes. Use the docker volume inspect command to view the data volume details.

How do I get a Docker volume path?

Volumes are also stored as part of the host file system, which is managed by Docker. On Linux, volumes are stored in “/var/lib/docker/volume”. Non-Docker processes should not be allowed to modify this part of the file system. One of the best ways to persist data in Docker is Volumes.

How do I access the Jupyter Notebook inside Docker?

Getting started with Docker file Let's install all Python packages when you are creating a container. Then run docker build : $ docker build -t shinokada/jupyter-notebook . We entered in a running container using docker exec and list the Python packages to see if our packages are installed.


1 Answers

the way you mount your volume i think its incorrect -v ~/tf/src it should be

-v /host/directory:/container/directory

like image 123
Fendi jatmiko Avatar answered Oct 02 '22 19:10

Fendi jatmiko