Fix Paddle 2.6.0 Dockerfile install bug (#13447)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/13462/head
Glenn Jocher 6 months ago committed by GitHub
parent f96d105730
commit 2fe0946376
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      docker/Dockerfile
  2. 2
      docker/Dockerfile-arm64
  3. 7
      docker/Dockerfile-cpu
  4. 2
      docker/Dockerfile-jetson
  5. 6
      docker/Dockerfile-python
  6. 4
      ultralytics/engine/trainer.py

@ -31,7 +31,7 @@ WORKDIR $APP_HOME
# Copy contents and assign permissions
COPY . $APP_HOME
RUN chown -R root:root $APP_HOME
RUN git remote set-url origin https://github.com/ultralytics/ultralytics.git
ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt $APP_HOME
# Install pip packages
@ -43,7 +43,7 @@ RUN pip install --no-cache-dir -e ".[export]" "albumentations>=1.4.6" comet pyco
RUN yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32 || yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32
RUN yolo export model=tmp/yolov8n.pt format=ncnn imgsz=32
# Requires <= Python 3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991
RUN pip install --no-cache-dir paddlepaddle>=2.6.0 x2paddle
RUN pip install --no-cache-dir "paddlepaddle>=2.6.0" x2paddle
# Fix error: `np.bool` was a deprecated alias for the builtin `bool` segmentation error in Tests
RUN pip install --no-cache-dir numpy==1.23.5
# Remove exported models

@ -25,7 +25,7 @@ WORKDIR $APP_HOME
# Copy contents and assign permissions
COPY . $APP_HOME
RUN chown -R root:root $APP_HOME
RUN git remote set-url origin https://github.com/ultralytics/ultralytics.git
ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt $APP_HOME
# Remove python3.11/EXTERNALLY-MANAGED to avoid 'externally-managed-environment' issue, Debian 12 Bookworm error

@ -23,8 +23,7 @@ WORKDIR $APP_HOME
# Copy contents (previously used git clone to avoid permission errors)
COPY . $APP_HOME
RUN chown -R root:root $APP_HOME
# RUN git clone https://github.com/ultralytics/ultralytics -b main $APP_HOME
RUN git remote set-url origin https://github.com/ultralytics/ultralytics.git
ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt $APP_HOME
# Remove python3.11/EXTERNALLY-MANAGED or use 'pip install --break-system-packages' avoid 'externally-managed-environment' Ubuntu nightly error
@ -37,8 +36,8 @@ RUN pip install --no-cache-dir -e ".[export]" --extra-index-url https://download
# Run exports to AutoInstall packages
RUN yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32
RUN yolo export model=tmp/yolov8n.pt format=ncnn imgsz=32
# Requires <= Python 3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991
# RUN pip install --no-cache-dir paddlepaddle>=2.6.0 x2paddle
# Requires Python<=3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991
# RUN pip install --no-cache-dir "paddlepaddle>=2.6.0" x2paddle
# Remove exported models
RUN rm -rf tmp

@ -25,7 +25,7 @@ WORKDIR $APP_HOME
# Copy contents and assign permissions
COPY . $APP_HOME
RUN chown -R root:root $APP_HOME
RUN git remote set-url origin https://github.com/ultralytics/ultralytics.git
ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt $APP_HOME
# Remove opencv-python from Ultralytics dependencies as it conflicts with opencv-python installed in base image

@ -23,7 +23,7 @@ WORKDIR $APP_HOME
# Copy contents and assign permissions
COPY . $APP_HOME
RUN chown -R root:root $APP_HOME
RUN git remote set-url origin https://github.com/ultralytics/ultralytics.git
ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt $APP_HOME
# Remove python3.11/EXTERNALLY-MANAGED or use 'pip install --break-system-packages' avoid 'externally-managed-environment' Ubuntu nightly error
@ -36,8 +36,8 @@ RUN pip install --no-cache-dir -e ".[export]" --extra-index-url https://download
# Run exports to AutoInstall packages
RUN yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32
RUN yolo export model=tmp/yolov8n.pt format=ncnn imgsz=32
# Requires <= Python 3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991
RUN pip install --no-cache-dir paddlepaddle>=2.6.0 x2paddle
# Requires Python<=3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991
RUN pip install --no-cache-dir "paddlepaddle>=2.6.0" x2paddle
# Remove exported models
RUN rm -rf tmp

@ -178,9 +178,9 @@ class BaseTrainer:
if self.args.rect:
LOGGER.warning("WARNING ⚠ 'rect=True' is incompatible with Multi-GPU training, setting 'rect=False'")
self.args.rect = False
if self.args.batch == -1:
if self.args.batch < 1.0:
LOGGER.warning(
"WARNING ⚠ 'batch=-1' for AutoBatch is incompatible with Multi-GPU training, setting "
"WARNING ⚠ 'batch<1' for AutoBatch is incompatible with Multi-GPU training, setting "
"default 'batch=16'"
)
self.args.batch = 16

Loading…
Cancel
Save