Fix Paddle 2.6.0 Dockerfile install bug (#13447)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
f96d105730
commit
2fe0946376
6 changed files with 12 additions and 13 deletions
|
|
@ -31,7 +31,7 @@ WORKDIR $APP_HOME
|
||||||
|
|
||||||
# Copy contents and assign permissions
|
# Copy contents and assign permissions
|
||||||
COPY . $APP_HOME
|
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
|
ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt $APP_HOME
|
||||||
|
|
||||||
# Install pip packages
|
# 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=edgetpu imgsz=32 || yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32
|
||||||
RUN yolo export model=tmp/yolov8n.pt format=ncnn 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
|
# 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
|
# 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
|
RUN pip install --no-cache-dir numpy==1.23.5
|
||||||
# Remove exported models
|
# Remove exported models
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ WORKDIR $APP_HOME
|
||||||
|
|
||||||
# Copy contents and assign permissions
|
# Copy contents and assign permissions
|
||||||
COPY . $APP_HOME
|
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
|
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
|
# 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 contents (previously used git clone to avoid permission errors)
|
||||||
COPY . $APP_HOME
|
COPY . $APP_HOME
|
||||||
RUN chown -R root:root $APP_HOME
|
RUN git remote set-url origin https://github.com/ultralytics/ultralytics.git
|
||||||
# RUN git clone https://github.com/ultralytics/ultralytics -b main $APP_HOME
|
|
||||||
ADD https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt $APP_HOME
|
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
|
# 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 exports to AutoInstall packages
|
||||||
RUN yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32
|
RUN yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32
|
||||||
RUN yolo export model=tmp/yolov8n.pt format=ncnn 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
|
# 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
|
||||||
# Remove exported models
|
# Remove exported models
|
||||||
RUN rm -rf tmp
|
RUN rm -rf tmp
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ WORKDIR $APP_HOME
|
||||||
|
|
||||||
# Copy contents and assign permissions
|
# Copy contents and assign permissions
|
||||||
COPY . $APP_HOME
|
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
|
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
|
# 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 contents and assign permissions
|
||||||
COPY . $APP_HOME
|
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
|
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
|
# 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 exports to AutoInstall packages
|
||||||
RUN yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32
|
RUN yolo export model=tmp/yolov8n.pt format=edgetpu imgsz=32
|
||||||
RUN yolo export model=tmp/yolov8n.pt format=ncnn 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
|
# 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
|
||||||
# Remove exported models
|
# Remove exported models
|
||||||
RUN rm -rf tmp
|
RUN rm -rf tmp
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -178,9 +178,9 @@ class BaseTrainer:
|
||||||
if self.args.rect:
|
if self.args.rect:
|
||||||
LOGGER.warning("WARNING ⚠️ 'rect=True' is incompatible with Multi-GPU training, setting 'rect=False'")
|
LOGGER.warning("WARNING ⚠️ 'rect=True' is incompatible with Multi-GPU training, setting 'rect=False'")
|
||||||
self.args.rect = False
|
self.args.rect = False
|
||||||
if self.args.batch == -1:
|
if self.args.batch < 1.0:
|
||||||
LOGGER.warning(
|
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'"
|
"default 'batch=16'"
|
||||||
)
|
)
|
||||||
self.args.batch = 16
|
self.args.batch = 16
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue