Solving the ldconfig vs unprivileged user issue
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- shell
- 领域
- devops, infrastructure
调研方向
首先,以 root 以及 UID/GID 1000/1000 身份,在镜像 tensorflow/tensorflow:2.17.0-gpu-jupyter 中复现报告的行为,使用 bashrc 启动路径,并检查 ldconfig 和 nvidia-smi。确定是否仍然需要 ldconfig,以及它应在镜像构建期间运行还是被移除;确定了能够避免所有权和权限冲突的启动行为后,即可视为完成。
由索引模型根据 Issue 内容生成。
描述
Following up on the problem reported in many places, but for example here at https://github.com/tensorflow/build/commit/8bfbcec2876755e263701b01e568584d4a5db744#r111483861 with a reply by @angerson at https://github.com/tensorflow/build/commit/8bfbcec2876755e263701b01e568584d4a5db744#r111514846 .
So in summary, for e.g. the tensorflow/tensorflow:2.17.0-gpu-jupyter image:
-
If you run the image in interactive mode (using e.g. the command
bashwhen starting the container) and as the default (root) user, you get a startup message warning you that can screw up the ownership of new files created on your volumes. So the user presumably then wants to run it as an unprivileged user. -
If you then run the image in interactive mode (using e.g. the command
bashwhen starting the container) and as an unprivileged user (e.g. UID/GID 1000/1000), the startup message of the container tells you it's all correct and good, butldconfigfails to run (giving/sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission deniederror message) and perhaps also nvidia-smi will not work at all.
So it's a catch 22, and whichever way you follow the startup recommendations, you're in the wrong :)
-
Should we perhaps stop recommending users to run the software as their own UID/GID and instead just inform them that if they do, file ownership/permissions might be a problem or need attention?
-
Or should we perhaps instead run the
ldconfigas part of the image build (while the build is still running as root) instead of in the bashrc file? Or will that not makenvidia-smiwork anymore? -
All that said, if I run the tensorflow/tensorflow:2.17.0-gpu-jupyter image now, I can't even find
nvidia-smiinstalled in it anywhere. Is it still there, or can we just get rid of theldconfigin bashrc because it's not needed anymore? If so, there's no problem anymore I suppose.
- 主要语言
- Shell
- 星标
- 312
- 派生
- 140
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tensorflow/build 的其他 Issue
-
sig build dockerfiles
难度 3/5 1-2 天 新手友好度 35/100
tensorflow/build#258 ·
-
sig build dockerfiles
难度 2/5 1-3 小时 新手友好度 45/100
tensorflow/build#221 · 2 条评论 · 5 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
tensorflow/build#217 · 3 条评论 ·
-
难度 5/5 一周以上 新手友好度 20/100
tensorflow/build#213 ·
-
sig build dockerfiles
难度 3/5 1-2 天 新手友好度 35/100
tensorflow/build#210 · 1 条评论 ·
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 70/100
WordPress/Documentation-Issue-Tracker#2540 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 67/100
jfrog/JFrog-Cloud-Installers#535 ·
-
NRDS AWS Costs NRDS AWS Output Data
难度 1/5 1 小时以内 新手友好度 82/100
CIROH-UA/ngen-datastream#435 ·
-
Update migen未关闭
难度 2/5 1-3 小时 新手友好度 70/100
YosysHQ/oss-cad-suite-build#220 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
docker-library/redmine#430 ·