如何使主机目录可在 Ubuntu 上共享?

How can I making the host directory sharable on Ubuntu?

我在 /home/easton/notebooks 中看不到 Jupyter 文件,我该如何解决这个问题?

nvidia-docker run -it --rm --name tf -p 8888:8888 -p 6006:6006 -v /home/easton/notebooks:/notebooks tensorflow/tensorflow:1.14.0-gpu-py3-jupyter

您挂载了错误的目录,根据文档,TensorFlow 的正确路径是容器中的 ~/notebooks//tf/notebooks

Docker 运行 命令将是

nvidia-docker run -it --rm --name tf -p 8888:8888 -p 6006:6006 -v /home/easton/notebooks:/tf/notebooks tensorflow/tensorflow:latest-py3-jupyter

你可以查看官方documentation and

可选功能

jupyter tags include Jupyter and some TensorFlow tutorial notebooks.. They start a Jupyter notebook server on boot. Mount a volume to /tf/notebooks to work on your own notebooks.

docker run -it --rm -v $(realpath ~/notebooks):/tf/notebooks -p 8888:8888 tensorflow/tensorflow:latest-py3-jupyter

Run a Jupyter notebook server with your own notebook directory (assumed here to be ~/notebooks). To use it, navigate to localhost:8888 in your browser.