|
|
|
@ -2,8 +2,8 @@ |
|
|
|
|
# Builds ultralytics/ultralytics:latest-cpu image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics |
|
|
|
|
# Image is CPU-optimized for ONNX, OpenVINO and PyTorch YOLO11 deployments |
|
|
|
|
|
|
|
|
|
# Start FROM Ubuntu image https://hub.docker.com/_/ubuntu |
|
|
|
|
FROM ubuntu:23.10 |
|
|
|
|
# Use official Python base image for reproducibility (3.11.10 for export and 3.12.6 for inference) |
|
|
|
|
FROM python:3.11.10-slim-bookworm |
|
|
|
|
|
|
|
|
|
# Set environment variables |
|
|
|
|
ENV PYTHONUNBUFFERED=1 \ |
|
|
|
@ -39,14 +39,14 @@ RUN pip install -e ".[export]" --extra-index-url https://download.pytorch.org/wh |
|
|
|
|
RUN yolo export model=tmp/yolo11n.pt format=edgetpu imgsz=32 |
|
|
|
|
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 pip install "paddlepaddle>=2.6.0" x2paddle |
|
|
|
|
|
|
|
|
|
# Creates a symbolic link to make 'python' point to 'python3' |
|
|
|
|
RUN ln -sf /usr/bin/python3 /usr/bin/python |
|
|
|
|
RUN pip install "paddlepaddle>=2.6.0" x2paddle |
|
|
|
|
|
|
|
|
|
# Remove extra build files |
|
|
|
|
RUN rm -rf tmp /root/.config/Ultralytics/persistent_cache.json |
|
|
|
|
|
|
|
|
|
# Set default command to bash |
|
|
|
|
CMD ["/bin/bash"] |
|
|
|
|
|
|
|
|
|
# Usage Examples ------------------------------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
# Build and Push |
|
|
|
|