Dockerfile fails to build on Ubuntu 22.04

未关闭
#6,909 0 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
docker, python, ubuntu

调研方向

从 Dockerfile 第 5 行及其前面的依赖安装步骤开始,然后重现报告中的命令 docker build -t tensorboard .。检查基于 Ubuntu 的镜像中的 Python 软件包安装失败问题;当镜像成功完成该步骤之后的构建时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

CLI Output

$ docker build -t tensorboard .

[+] Building 62.7s (7/17)                                                                                         docker:default
 => [internal] load build definition from Dockerfile                                                                        0.0s
 => => transferring dockerfile: 1.26kB                                                                                      0.0s
 => [internal] load metadata for docker.io/library/ubuntu:latest                                                            0.0s
 => [internal] load .dockerignore                                                                                           0.0s
 => => transferring context: 103B                                                                                           0.0s
 => [ 1/13] FROM docker.io/library/ubuntu:latest                                                                            0.0s
 => [internal] load build context                                                                                           1.0s
 => => transferring context: 163.97MB                                                                                       1.0s
 => [ 2/13] RUN apt update && apt install -y wget unzip python3 python3-pip python3-dev python-is-python3 default-jdk nod  62.3s
 => ERROR [ 3/13] RUN python3 -m pip install -U pip                                                                         0.4s
------
 > [ 3/13] RUN python3 -m pip install -U pip:
0.357 error: externally-managed-environment
0.357
0.357 × This environment is externally managed
0.357 ╰─> To install Python packages system-wide, try apt install
0.357     python3-xyz, where xyz is the package you are trying to
0.357     install.
0.357
0.357     If you wish to install a non-Debian-packaged Python package,
0.357     create a virtual environment using python3 -m venv path/to/venv.
0.357     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
0.357     sure you have python3-full installed.
0.357
0.357     If you wish to install a non-Debian packaged Python application,
0.357     it may be easiest to use pipx install xyz, which will manage a
0.357     virtual environment for you. Make sure you have pipx installed.
0.357
0.357     See /usr/share/doc/python3.12/README.venv for more information.
0.357
0.357 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
0.357 hint: See PEP 668 for the detailed specification.
------
Dockerfile:5
--------------------
   3 |     # Install environment dependencies
   4 |     RUN apt update && apt install -y wget unzip python3 python3-pip python3-dev python-is-python3 default-jdk nodejs npm
   5 | >>> RUN python3 -m pip install -U pip
   6 |
   7 |     # Setup build environment
--------------------
ERROR: failed to solve: process "/bin/sh -c python3 -m pip install -U pip" did not complete successfully: exit code: 1
主要语言
TypeScript
星标
7.2k
派生
1.7k
平均合并
1 天 13 小时
30 天内合并 PR
3

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tensorflow/tensorboard 的其他 Issue

查看 tensorflow/tensorboard 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。