Add UV_BREAK_SYSTEM_PACKAGES environment variable (#23809)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Glenn Jocher 2026-03-05 23:10:15 +01:00 committed by GitHub
parent 83989148fb
commit 1ce3b0c4e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 20 additions and 8 deletions

View file

@ -13,6 +13,7 @@ ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_BREAK_SYSTEM_PACKAGES=1 \
UV_BREAK_SYSTEM_PACKAGES=1 \
MKL_THREADING_LAYER=GNU \
OMP_NUM_THREADS=1 \
TF_CPP_MIN_LOG_LEVEL=3 \

View file

@ -13,6 +13,7 @@ ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_BREAK_SYSTEM_PACKAGES=1 \
UV_BREAK_SYSTEM_PACKAGES=1 \
TORCH_CPP_LOG_LEVEL=ERROR
# Downloads to user config dir
@ -39,7 +40,7 @@ ADD https://github.com/ultralytics/assets/releases/download/v8.4.0/yolo26n.pt .
# Install pip packages, create python symlink, and remove build files
RUN python3 -m pip install uv && \
uv pip install --system -e ".[export]" --break-system-packages && \
uv pip install --system -e ".[export]" && \
# Creates a symbolic link to make 'python' point to 'python3'
ln -sf /usr/bin/python3 /usr/bin/python && \
# Remove extra build files

View file

@ -10,7 +10,8 @@ FROM nvcr.io/nvidia/l4t-jetpack:r35.4.1
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_BREAK_SYSTEM_PACKAGES=1
PIP_BREAK_SYSTEM_PACKAGES=1 \
UV_BREAK_SYSTEM_PACKAGES=1
# Downloads to user config dir
ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \

View file

@ -10,7 +10,8 @@ FROM nvcr.io/nvidia/l4t-jetpack:r36.4.0
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_BREAK_SYSTEM_PACKAGES=1
PIP_BREAK_SYSTEM_PACKAGES=1 \
UV_BREAK_SYSTEM_PACKAGES=1
# Downloads to user config dir
ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \

View file

@ -10,7 +10,8 @@ FROM nvcr.io/nvidia/pytorch:25.10-py3
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_BREAK_SYSTEM_PACKAGES=1
PIP_BREAK_SYSTEM_PACKAGES=1 \
UV_BREAK_SYSTEM_PACKAGES=1
# Downloads to user config dir
ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
@ -34,10 +35,10 @@ ADD https://github.com/ultralytics/assets/releases/download/v8.4.0/yolo26n.pt .
# Install pip packages (uv already installed in base image)
RUN uv pip install --system \
https://github.com/ultralytics/assets/releases/download/v0.0.0/onnxruntime_gpu-1.24.0-cp312-cp312-linux_aarch64.whl --break-system-packages && \
https://github.com/ultralytics/assets/releases/download/v0.0.0/onnxruntime_gpu-1.24.0-cp312-cp312-linux_aarch64.whl && \
# Reinstall torch and torchvision to ensure CUDA 13.0 compatibility
uv pip install --system --force-reinstall torch torchvision --index-url https://download.pytorch.org/whl/cu130 --break-system-packages && \
uv pip install --system -e ".[export]" --break-system-packages && \
uv pip install --system --force-reinstall torch torchvision --index-url https://download.pytorch.org/whl/cu130 && \
uv pip install --system -e ".[export]" && \
# Remove extra build files
rm -rf *.whl /root/.config/Ultralytics/persistent_cache.json

View file

@ -11,6 +11,7 @@ ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_BREAK_SYSTEM_PACKAGES=1 \
UV_BREAK_SYSTEM_PACKAGES=1 \
TORCH_CPP_LOG_LEVEL=ERROR
# Downloads to user config dir

View file

@ -440,7 +440,7 @@ Yes, expand the **Advanced Settings** section in the training dialog to access a
### Can I train from a dataset page?
Yes, the **Train** button on dataset pages opens the training dialog with the dataset pre-selected and locked. You then select a project and model to begin training.
Yes, the **Train** button on dataset pages opens the training dialog with the dataset preselected and locked. You then select a project and model to begin training.
## Training Parameters Reference

View file

@ -55,6 +55,9 @@
1579093407@qq.com:
avatar: https://avatars.githubusercontent.com/u/160490334?v=4
username: YOLOv5-Magic
160138070+deriiinjv@users.noreply.github.com:
avatar: https://avatars.githubusercontent.com/u/160138070?v=4
username: deriiinjv
16029431+jules-ai@users.noreply.github.com:
avatar: https://avatars.githubusercontent.com/u/16029431?v=4
username: jules-ai
@ -88,6 +91,9 @@
40165666+berry-ding@users.noreply.github.com:
avatar: https://avatars.githubusercontent.com/u/40165666?v=4
username: berry-ding
40495855+monkeyjack123@users.noreply.github.com:
avatar: https://avatars.githubusercontent.com/u/40495855?v=4
username: monkeyjack123
40582518+erfan-zekri@users.noreply.github.com:
avatar: https://avatars.githubusercontent.com/u/40582518?v=4
username: erfan-zekri