镜像构建历史
# 2025-11-27 21:12:14 10.79GB 执行命令并创建新的镜像层
RUN /bin/sh -c uv pip install --system -e ".[export]" && uv pip install --system numpy==1.26.4 && yolo export model=tmp/yolo11n.pt format=edgetpu imgsz=32 && yolo export model=tmp/yolo11n.pt format=ncnn imgsz=32 && yolo export model=tmp/yolo11n.pt format=imx imgsz=32 && uv pip install --system paddlepaddle x2paddle && rm -rf tmp /root/.config/Ultralytics/persistent_cache.json # buildkit
# 2025-11-27 21:07:45 8.09KB 执行命令并创建新的镜像层
RUN /bin/sh -c sed -i -e 's/"torch>=1.8.0/"torch>=1.8.0,<=2.8.0/' pyproject.toml # buildkit
# 2025-11-27 21:07:44 215.86MB 执行命令并创建新的镜像层
RUN /bin/sh -c apt-get update && apt-get install -y --no-install-recommends gnupg default-jre-headless && apt-get clean && rm -rf /var/lib/apt/lists/* # buildkit
# 2025-11-27 21:07:24 1.31GB 执行命令并创建新的镜像层
RUN /bin/sh -c pip install uv && uv pip install --system -e . --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match && rm -rf tmp ~/.cache /root/.config/Ultralytics/persistent_cache.json # buildkit
# 2025-11-27 21:07:11 5.61MB 复制文件或目录到容器中
ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt . # buildkit
# 2025-11-27 21:07:11 8.64KB 执行命令并创建新的镜像层
RUN /bin/sh -c sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config && sed -i'' -e 's/"opencv-python/"opencv-python-headless/' pyproject.toml # buildkit
# 2025-11-27 21:07:11 52.98MB 复制新文件或目录到容器中
COPY . . # buildkit
# 2025-11-27 21:07:10 0.00B 设置工作目录为/ultralytics
WORKDIR /ultralytics
# 2025-11-27 21:07:10 365.61MB 执行命令并创建新的镜像层
RUN /bin/sh -c apt-get update && apt-get install -y --no-install-recommends python3-pip git zip unzip wget curl htop libgl1 libglib2.0-0 && apt-get clean && rm -rf /var/lib/apt/lists/* # buildkit
# 2025-11-27 21:06:57 24.05MB 复制文件或目录到容器中
ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.Unicode.ttf /root/.config/Ultralytics/ # buildkit
# 2025-11-27 21:06:57 0.00B 设置环境变量 PYTHONUNBUFFERED PYTHONDONTWRITEBYTECODE PIP_NO_CACHE_DIR PIP_BREAK_SYSTEM_PACKAGES
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 PIP_NO_CACHE_DIR=1 PIP_BREAK_SYSTEM_PACKAGES=1
# 2024-10-19 07:23:40 0.00B 设置默认要执行的命令
CMD ["python3"]
# 2024-10-19 07:23:40 36.00B 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; for src in idle3 pip3 pydoc3 python3 python3-config; do dst="$(echo "$src" | tr -d 3)"; [ -s "/usr/local/bin/$src" ]; [ ! -e "/usr/local/bin/$dst" ]; ln -svT "$src" "/usr/local/bin/$dst"; done # buildkit
# 2024-10-19 07:23:40 45.80MB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends dpkg-dev gcc gnupg libbluetooth-dev libbz2-dev libc6-dev libdb-dev libffi-dev libgdbm-dev liblzma-dev libncursesw5-dev libreadline-dev libsqlite3-dev libssl-dev make tk-dev uuid-dev wget xz-utils zlib1g-dev ; wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; echo "$PYTHON_SHA256 *python.tar.xz" | sha256sum -c -; wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; gpg --batch --verify python.tar.xz.asc python.tar.xz; gpgconf --kill all; rm -rf "$GNUPGHOME" python.tar.xz.asc; mkdir -p /usr/src/python; tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; rm python.tar.xz; cd /usr/src/python; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; ./configure --build="$gnuArch" --enable-loadable-sqlite-extensions --enable-optimizations --enable-option-checking=fatal --enable-shared --with-lto --with-ensurepip ; nproc="$(nproc)"; EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; LDFLAGS="${LDFLAGS:--Wl},--strip-all"; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:-}" ; rm python; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" python ; make install; cd /; rm -rf /usr/src/python; find /usr/local -depth \( \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \) -exec rm -rf '{}' + ; ldconfig; apt-mark auto '.*' > /dev/null; apt-mark manual $savedAptMark; find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' | sort -u | xargs -r dpkg-query --search | cut -d: -f1 | sort -u | xargs -r apt-mark manual ; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; rm -rf /var/lib/apt/lists/*; export PYTHONDONTWRITEBYTECODE=1; python3 --version; pip3 install --disable-pip-version-check --no-cache-dir --no-compile 'setuptools==65.5.1' wheel ; pip3 --version # buildkit
# 2024-10-19 07:23:40 0.00B 设置环境变量 PYTHON_SHA256
ENV PYTHON_SHA256=07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372
# 2024-10-19 07:23:40 0.00B 设置环境变量 PYTHON_VERSION
ENV PYTHON_VERSION=3.11.10
# 2024-10-19 07:23:40 0.00B 设置环境变量 GPG_KEY
ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D
# 2024-10-19 07:23:40 8.48MB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends ca-certificates netbase tzdata ; rm -rf /var/lib/apt/lists/* # buildkit
# 2024-10-19 07:23:40 0.00B 设置环境变量 LANG
ENV LANG=C.UTF-8
# 2024-10-19 07:23:40 0.00B 设置环境变量 PATH
ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# 2024-10-19 07:23:40 74.82MB
# debian.sh --arch 'amd64' out/ 'bookworm' '@1733097600'
镜像信息
{
"Id": "sha256:de45e488596d3583146382afe674285768de7661999f84ed8e1de48c24d39c8d",
"RepoTags": [
"ultralytics/ultralytics:8.3.233-python-export",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/ultralytics/ultralytics:8.3.233-python-export"
],
"RepoDigests": [
"ultralytics/ultralytics@sha256:1b6d188c8d9178404b3515a26d5a1c18742b37763d48b61318ce16c41420af53",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/ultralytics/ultralytics@sha256:06a81aa9991b7b2a96ebc550dbc589b4306764de52748c31f1d3c87b23882420"
],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2025-11-27T13:12:14.395445948Z",
"Container": "",
"ContainerConfig": null,
"DockerVersion": "",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D",
"PYTHON_VERSION=3.11.10",
"PYTHON_SHA256=07a4356e912900e61a15cb0949a06c4a05012e213ecd6b4e84d0f67aabbee372",
"PYTHONUNBUFFERED=1",
"PYTHONDONTWRITEBYTECODE=1",
"PIP_NO_CACHE_DIR=1",
"PIP_BREAK_SYSTEM_PACKAGES=1"
],
"Cmd": [
"python3"
],
"Image": "",
"Volumes": null,
"WorkingDir": "/ultralytics",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"org.opencontainers.image.description": "Ultralytics Dockerfile-python-export image",
"org.opencontainers.image.licenses": "AGPL-3.0-or-later",
"org.opencontainers.image.source": "https://github.com/ultralytics/ultralytics"
}
},
"Architecture": "amd64",
"Os": "linux",
"Size": 12894549978,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/4959ab8f2a9455d5277b57398f7c44c59d5b6b8bde26b6b87042d459ce6039b7/diff:/var/lib/docker/overlay2/b70b179c68656e3fdcc1ce02c19f9f1e973a77b2f3aead9da9dc4c0b0cd01b22/diff:/var/lib/docker/overlay2/5a0b02017e8ba15603e57377a9b96a8554e24c227255679cc69f6167d8ffc12c/diff:/var/lib/docker/overlay2/24b00ed0cc372c8983e577ede841885614e63846e3c921ec4f2cddcf85e99577/diff:/var/lib/docker/overlay2/033e305adcc50ec90044fa57470714e3b708bbe8cd17f7537a8b809ab0c1fd5e/diff:/var/lib/docker/overlay2/6cd94d914542b5939f41c75f2ba0a6c4cc4a0fb9f820b2a09a7f7d7a18954be2/diff:/var/lib/docker/overlay2/0f396d4421063528189c2c97cef9fcb9480ebd89ac415be31d36eb84a77e919c/diff:/var/lib/docker/overlay2/549fe60659f1d93d69edc46d68fc3738a39419d24e2e4759fb0763468a56029b/diff:/var/lib/docker/overlay2/261c76ae96b156b15f4ef8f29b4eda018f13bef7c49225ef24b7ec8a344d241c/diff:/var/lib/docker/overlay2/cb020ccff0353041bde796f7a499315df9ff589e93c4f9b54b9eb918ebffa141/diff:/var/lib/docker/overlay2/74f6c7769240f5d64fa2b499e0d0c1747d45630437a5cab2717c77a9706c894e/diff:/var/lib/docker/overlay2/2427347be74996832db5c83ca23329360afddbaaeaa378ffeebad1d8668a16f5/diff:/var/lib/docker/overlay2/404e59c4c9adc52232d40ea19adf6c8d76b2fc9392dc54e49d9840bbd9ffc580/diff",
"MergedDir": "/var/lib/docker/overlay2/87df33491df49cea33e24c4f97aad27c85030166c72af685dbc0046b3e921b61/merged",
"UpperDir": "/var/lib/docker/overlay2/87df33491df49cea33e24c4f97aad27c85030166c72af685dbc0046b3e921b61/diff",
"WorkDir": "/var/lib/docker/overlay2/87df33491df49cea33e24c4f97aad27c85030166c72af685dbc0046b3e921b61/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:c0f1022b22a9b36851b358f44e5475e39d166e71a8073cf53c894a299239b1c5",
"sha256:bc9155b10ccec596b3283ceca7cc847bc4046db14eab7f77b9b170b5e825e0a5",
"sha256:0266a6d27cd42ef4422dfb0b6dbd4186f3524600502559e13947f8d4de65c931",
"sha256:cfc6e3b5400ce78d3df9c4826f39a78db0e7e9a01d2581b860b5611ac6829af6",
"sha256:b7989ea560d660b2b5ce9528acec023c082806af03284b7337bb83fefa4d4c47",
"sha256:d107ed53124a06d51edfe1bc512a7b3ed4fe807e0bf8b2c70559245945bf3b31",
"sha256:0be75cd5e3ad998f86737d2bf03d49605f32a4c4f10f0f7073a5efc768641e75",
"sha256:e9610f92ecfb74aeee9ef62abe3ccbf8960927f3d6b44b1a6bd9735304266a79",
"sha256:b2f2c14b67a51c1f16f90336bbb32b2ef71187926970fd0504c74accf50f62fa",
"sha256:05446d37305bfd598efd55f73968acd8bbeedf490a02935fd858d64a1e480a6e",
"sha256:9ae19466b862f5908745755ab361ee16cad89417a77f01c6f9b9d114f098e02f",
"sha256:10755ac4bf8faeeb89c3c7d2069ffba6bc316daa552930dad33014deb4c2e757",
"sha256:b90f3d1e6d44eb413ddf903453b627ea60047af7a5a9345ab7ffc6843911d628",
"sha256:47850df5bddd061e361e1c471e18dfb945e71f0d1c4e12d5716aed927e55b5ab"
]
},
"Metadata": {
"LastTagTime": "2025-11-29T01:15:09.788052134+08:00"
}
}