Hi I am trying to get TensorFlow
notebook folder mounted to /src/work
folder in Ubuntu.
sudo docker run -it -v /src/work:/HOME/notebooks -p 8888:8888 tensorflow/tensorflow:1.3.0
I have tried many combination of -v flags. It is not reading the files already in my work folder or saving new files to it.
This will work as expected. Make sure you have a
src
folder in the host's root directory (/
) eg. you may have~/repo/src/work
this is different than/src/work
. In the container, the files will show up exactly on root's/HOME/notebooks
directory.Make sure you are checking the files in the right directory.
You're mounting the volume incorrectly, precisely the path. It should be
-v ~/[absolute path from $HOME]/src/work:~/notebooks/
Explanation:
Since your working directory is
/notebooks
, which places it at/$HOME/notebooks
. You use~
to get to the$HOME
.