简体   繁体   English

docker 未使用 -v 和 --mount 在 wsl2 上保存

[英]docker not saving at wsl2 with -v and --mount

I tried to run tensorflow container at wsl2, but there is trouble: my notebooks not saving.我尝试在 wsl2 上运行 tensorflow 容器,但有问题:我的笔记本没有保存。 My Dockerfile我的 Dockerfile

FROM tensorflow/tensorflow:latest-gpu-py3-jupyter
COPY Notebooks/ Notebooks/

i run it with我用它运行

docker run -it  --gpus all -p 8888:8888 -v /mnt/c/tflearn/tf1/Notebooks/:/Notebooks/ tflearn1 

and my notebooks not saving (i saved it to Notebooks/ path), i dont know what to do, because previously its worked.Its builed good, GPU is worked, all fine, but not saving.我的笔记本没有保存(我把它保存到笔记本/路径),我不知道该怎么做,因为它以前工作过。它的构建很好,GPU 可以工作,一切正常,但没有保存。 I tried to do with mount, but same issue - its not saving.我尝试使用 mount,但同样的问题 - 它没有保存。

What exactly do you have in mind?你到底在想什么?

Just for info, you mount the path from the host into the container.仅供参考,您将主机的路径挂载到容器中。 That means if /mnt/c/tflearn/tf1/Notebooks/ is empty it will be empty in the container too.这意味着如果 /mnt/c/tflearn/tf1/Notebooks/ 是空的,它在容器中也将是空的。 You have to catch this with eg an entrypoint script.您必须使用例如入口点脚本来捕获它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM