docker - 尝试在 Windows 上使用 Docker 运行 tensorflow 时出现警告
问题描述
我无法从 tensorflow 下载图像来启动 tensorflow
我在 Windows 10 上使用了 docker,错误输出是这样说的:
WARNING: You are running this container as root, which can cause new files in
mounted volumes to be created as the root user on your host machine.
To avoid this, run the container by specifying your user's userid:
$ docker run -u $(id -u):$(id -g) args...
我尝试搜索 google 的问题...但找不到,我在 docker 方面的经验为空
解决方案
这是一个警告,指定要访问/更改在挂载目录中创建的文件,您可能需要 sudo 并且您可能无法以非 sudo 用户身份更改此类文件,因为您的 docker 容器在创建它们时使用了 sudo 权限。
快速搜索显示有许多可用的博客参考,检查这些 -
- Docker 在挂载的卷中以 root 身份创建文件
- 以非 root 用户身份运行 Docker 容器
- 使用 windows 子系统 linux 为 windows 设置 Docker
- https://jtreminio.com/blog/running-docker-containers-as-current-host-user/
- https://medium.com/better-programming/running-a-container-with-a-non-root-user-e35830d1f42a
- https://docs.docker.com/install/linux/linux-postinstall/
推荐阅读
- linux - 需要有关使用嵌套命令替代的建议
- r - 在 R 中为多个绘图包含更多空间
- python - 如何应用切片窗口将熊猫转换为二维数组?
- javascript - 如何使用 Jest 测试反应组件,该组件映射到对象数组以匹配设置要呈现的值的对象值
- javascript - 在 NextJS 中让 styled-jsx 与 tailwindcss 一起工作
- h2o - 包含深度学习时,H2O Stacked Ensemble MOJO 不返回值
- swift - 使用 Swift Combine 多次重复网络请求
- python - 通过 SFTP 修改大型 Sqlite 数据库
- c# - NetCore:如何通过 HttpWebRequest 发送小写 Keep-Alive 标头
- html - React Material UI-制作一个按钮打开一个文件选择器窗口