Docker python3 > python symbolic links (#19836)

This commit is contained in:
Glenn Jocher 2025-03-24 00:49:41 +01:00 committed by GitHub
parent 6c80ba6e95
commit bbd2bf3aa6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -39,7 +39,7 @@ RUN pip install uv
RUN uv pip install --system -e ".[export]" --break-system-packages
# Creates a symbolic link to make 'python' point to 'python3'
RUN ln -sf /usr/bin/python3 /usr/bin/python
RUN which python3 && ln -sf $(which python3) $(dirname $(which python3))/python || echo "Python3 not found"
# Remove extra build files
RUN rm -rf /root/.config/Ultralytics/persistent_cache.json

View File

@ -55,6 +55,9 @@ RUN yolo export model=tmp/yolo11n.pt format=ncnn imgsz=32
# Requires <= Python 3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991
RUN uv pip install --system "paddlepaddle>=2.6.0" x2paddle
# Creates a symbolic link to make 'python' point to 'python3'
RUN which python3 && ln -sf $(which python3) $(dirname $(which python3))/python || echo "Python3 not found"
# Remove extra build files
RUN rm -rf tmp /root/.config/Ultralytics/persistent_cache.json