volume mount tensorflow container for persistance storage

自作多情 提交于 2019-12-12 04:03:01

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/45810450/volume-mount-tensorflow-container-for-persistance-storage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!