单目3D初始代码
This commit is contained in:
34
docker/Dockerfile-python-export
Executable file
34
docker/Dockerfile-python-export
Executable file
@@ -0,0 +1,34 @@
|
||||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
# Builds ultralytics/ultralytics:latest-python-export image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics
|
||||
# Full-featured image with export capabilities for YOLO model conversion
|
||||
|
||||
# Build from lightweight Ultralytics Python image
|
||||
FROM ultralytics/ultralytics:latest-python
|
||||
|
||||
# Install export-specific system packages
|
||||
# gnupg required for Edge TPU install
|
||||
# Java runtime environment (default-jre-headless) required for Sony IMX export
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends gnupg default-jre-headless && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install export dependencies and run exports to AutoInstall packages
|
||||
RUN uv pip install --system -e ".[export]" && \
|
||||
# Run exports to AutoInstall packages (IMX can only export to YOLO11)
|
||||
yolo export model=tmp/yolo26n.pt format=edgetpu imgsz=32 && \
|
||||
yolo export model=tmp/yolo26n.pt format=ncnn imgsz=32 && \
|
||||
yolo export model=tmp/yolo11n.pt format=imx imgsz=32 && \
|
||||
uv pip install --system paddlepaddle x2paddle && \
|
||||
# Remove extra build files
|
||||
rm -rf tmp /root/.config/Ultralytics/persistent_cache.json
|
||||
|
||||
# Usage --------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Production builds: https://github.com/ultralytics/ultralytics/blob/main/.github/workflows/docker.yml
|
||||
# Example (build): t=ultralytics/ultralytics:latest-python-export && docker build -f docker/Dockerfile-python-export -t $t .
|
||||
# Example (push): docker push $t
|
||||
# Example (pull): t=ultralytics/ultralytics:latest-python-export && docker pull $t
|
||||
# Example (run): docker run -it --ipc=host $t
|
||||
# Example (run-with-volume): docker run -it --ipc=host -v "$PWD/shared/datasets:/datasets" $t
|
||||
Reference in New Issue
Block a user