sunsmarterjieleaf commited on
Commit
904b9bc
Β·
verified Β·
1 Parent(s): 931521c

Delete docker

Browse files
docker/Dockerfile DELETED
@@ -1,92 +0,0 @@
1
- # Ultralytics YOLO πŸš€, AGPL-3.0 license
2
- # Builds ultralytics/ultralytics:latest image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics
3
- # Image is CUDA-optimized for YOLO11 single/multi-GPU training and inference
4
-
5
- # Start FROM PyTorch image https://hub.docker.com/r/pytorch/pytorch or nvcr.io/nvidia/pytorch:23.03-py3
6
- FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime
7
-
8
- # Set environment variables
9
- # Avoid DDP error "MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 library" https://github.com/pytorch/pytorch/issues/37377
10
- ENV PYTHONUNBUFFERED=1 \
11
- PYTHONDONTWRITEBYTECODE=1 \
12
- PIP_NO_CACHE_DIR=1 \
13
- PIP_BREAK_SYSTEM_PACKAGES=1 \
14
- MKL_THREADING_LAYER=GNU \
15
- OMP_NUM_THREADS=1
16
-
17
- # Downloads to user config dir
18
- ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
19
- https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.Unicode.ttf \
20
- /root/.config/Ultralytics/
21
-
22
- # Install linux packages
23
- # g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package
24
- # libsm6 required by libqxcb to create QT-based windows for visualization; set 'QT_DEBUG_PLUGINS=1' to test in docker
25
- RUN apt-get update && \
26
- apt-get install -y --no-install-recommends \
27
- gcc git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 libsm6 \
28
- && rm -rf /var/lib/apt/lists/*
29
-
30
- # Security updates
31
- # https://security.snyk.io/vuln/SNYK-UBUNTU1804-OPENSSL-3314796
32
- RUN apt upgrade --no-install-recommends -y openssl tar
33
-
34
- # Create working directory
35
- WORKDIR /ultralytics
36
-
37
- # Copy contents and configure git
38
- COPY . .
39
- RUN sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config
40
- ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt .
41
-
42
- # Install pip packages
43
- RUN pip install uv
44
- # Note -cu12 must be used with tensorrt
45
- RUN uv pip install --system -e ".[export]" tensorrt-cu12 "albumentations>=1.4.6" comet pycocotools
46
-
47
- # Run exports to AutoInstall packages
48
- # Edge TPU export fails the first time so is run twice here
49
- RUN yolo export model=tmp/yolo11n.pt format=edgetpu imgsz=32 || yolo export model=tmp/yolo11n.pt format=edgetpu imgsz=32
50
- RUN yolo export model=tmp/yolo11n.pt format=ncnn imgsz=32
51
- # Requires <= Python 3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991
52
- RUN uv pip install --system "paddlepaddle>=2.6.0" x2paddle
53
- # Fix error: `np.bool` was a deprecated alias for the builtin `bool` segmentation error in Tests
54
- RUN uv pip install --system numpy==1.23.5
55
-
56
- # Remove extra build files
57
- RUN rm -rf tmp /root/.config/Ultralytics/persistent_cache.json
58
-
59
- # Usage Examples -------------------------------------------------------------------------------------------------------
60
-
61
- # Build and Push
62
- # t=ultralytics/ultralytics:latest && sudo docker build -f docker/Dockerfile -t $t . && sudo docker push $t
63
-
64
- # Pull and Run with access to all GPUs
65
- # t=ultralytics/ultralytics:latest && sudo docker pull $t && sudo docker run -it --ipc=host --gpus all $t
66
-
67
- # Pull and Run with access to GPUs 2 and 3 (inside container CUDA devices will appear as 0 and 1)
68
- # t=ultralytics/ultralytics:latest && sudo docker pull $t && sudo docker run -it --ipc=host --gpus '"device=2,3"' $t
69
-
70
- # Pull and Run with local directory access
71
- # t=ultralytics/ultralytics:latest && sudo docker pull $t && sudo docker run -it --ipc=host --gpus all -v "$(pwd)"/shared/datasets:/datasets $t
72
-
73
- # Kill all
74
- # sudo docker kill $(sudo docker ps -q)
75
-
76
- # Kill all image-based
77
- # sudo docker kill $(sudo docker ps -qa --filter ancestor=ultralytics/ultralytics:latest)
78
-
79
- # DockerHub tag update
80
- # t=ultralytics/ultralytics:latest tnew=ultralytics/ultralytics:v6.2 && sudo docker pull $t && sudo docker tag $t $tnew && sudo docker push $tnew
81
-
82
- # Clean up
83
- # sudo docker system prune -a --volumes
84
-
85
- # Update Ubuntu drivers
86
- # https://www.maketecheasier.com/install-nvidia-drivers-ubuntu/
87
-
88
- # DDP test
89
- # python -m torch.distributed.run --nproc_per_node 2 --master_port 1 train.py --epochs 3
90
-
91
- # GCP VM from Image
92
- # docker.io/ultralytics/ultralytics:latest
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docker/Dockerfile-arm64 DELETED
@@ -1,58 +0,0 @@
1
- # Ultralytics YOLO πŸš€, AGPL-3.0 license
2
- # Builds ultralytics/ultralytics:latest-arm64 image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics
3
- # Image is aarch64-compatible for Apple M1, M2, M3, Raspberry Pi and other ARM architectures
4
-
5
- # Start FROM Ubuntu image https://hub.docker.com/_/ubuntu with "FROM arm64v8/ubuntu:22.04" (deprecated)
6
- # Start FROM Debian image for arm64v8 https://hub.docker.com/r/arm64v8/debian (new)
7
- FROM arm64v8/debian:bookworm-slim
8
-
9
- # Set environment variables
10
- ENV PYTHONUNBUFFERED=1 \
11
- PYTHONDONTWRITEBYTECODE=1 \
12
- PIP_NO_CACHE_DIR=1 \
13
- PIP_BREAK_SYSTEM_PACKAGES=1
14
-
15
- # Downloads to user config dir
16
- ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
17
- https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.Unicode.ttf \
18
- /root/.config/Ultralytics/
19
-
20
- # Install linux packages
21
- # g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package
22
- # pkg-config and libhdf5-dev (not included) are needed to build 'h5py==3.11.0' aarch64 wheel required by 'tensorflow'
23
- RUN apt-get update && \
24
- apt-get install -y --no-install-recommends \
25
- python3-pip git zip unzip wget curl htop gcc libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 \
26
- && rm -rf /var/lib/apt/lists/*
27
-
28
- # Create working directory
29
- WORKDIR /ultralytics
30
-
31
- # Copy contents and configure git
32
- COPY . .
33
- RUN sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config
34
- ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt .
35
-
36
- # Install pip packages
37
- RUN pip install uv
38
- RUN uv pip install --system -e ".[export]" --break-system-packages
39
-
40
- # Creates a symbolic link to make 'python' point to 'python3'
41
- RUN ln -sf /usr/bin/python3 /usr/bin/python
42
-
43
- # Remove extra build files
44
- RUN rm -rf /root/.config/Ultralytics/persistent_cache.json
45
-
46
- # Usage Examples -------------------------------------------------------------------------------------------------------
47
-
48
- # Build and Push
49
- # t=ultralytics/ultralytics:latest-arm64 && sudo docker build --platform linux/arm64 -f docker/Dockerfile-arm64 -t $t . && sudo docker push $t
50
-
51
- # Run
52
- # t=ultralytics/ultralytics:latest-arm64 && sudo docker run -it --ipc=host $t
53
-
54
- # Pull and Run
55
- # t=ultralytics/ultralytics:latest-arm64 && sudo docker pull $t && sudo docker run -it --ipc=host $t
56
-
57
- # Pull and Run with local volume mounted
58
- # t=ultralytics/ultralytics:latest-arm64 && sudo docker pull $t && sudo docker run -it --ipc=host -v "$(pwd)"/shared/datasets:/datasets $t
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docker/Dockerfile-conda DELETED
@@ -1,50 +0,0 @@
1
- # Ultralytics YOLO πŸš€, AGPL-3.0 license
2
- # Builds ultralytics/ultralytics:latest-conda image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics
3
- # Image is optimized for Ultralytics Anaconda (https://anaconda.org/conda-forge/ultralytics) installation and usage
4
-
5
- # Start FROM miniconda3 image https://hub.docker.com/r/continuumio/miniconda3
6
- FROM continuumio/miniconda3:latest
7
-
8
- # Set environment variables
9
- ENV PYTHONUNBUFFERED=1 \
10
- PYTHONDONTWRITEBYTECODE=1 \
11
- PIP_NO_CACHE_DIR=1 \
12
- PIP_BREAK_SYSTEM_PACKAGES=1
13
-
14
- # Downloads to user config dir
15
- ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
16
- https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.Unicode.ttf \
17
- /root/.config/Ultralytics/
18
-
19
- # Install linux packages
20
- RUN apt-get update && \
21
- apt-get install -y --no-install-recommends \
22
- libgl1 \
23
- && rm -rf /var/lib/apt/lists/*
24
-
25
- # Copy contents
26
- ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt .
27
-
28
- # Install conda packages
29
- # mkl required to fix 'OSError: libmkl_intel_lp64.so.2: cannot open shared object file: No such file or directory'
30
- RUN conda config --set solver libmamba && \
31
- conda install pytorch torchvision pytorch-cuda=12.1 -c pytorch -c nvidia && \
32
- conda install -c conda-forge ultralytics mkl
33
- # conda install -c pytorch -c nvidia -c conda-forge pytorch torchvision pytorch-cuda=12.1 ultralytics mkl
34
-
35
- # Remove extra build files
36
- RUN rm -rf /root/.config/Ultralytics/persistent_cache.json
37
-
38
- # Usage Examples -------------------------------------------------------------------------------------------------------
39
-
40
- # Build and Push
41
- # t=ultralytics/ultralytics:latest-conda && sudo docker build -f docker/Dockerfile-cpu -t $t . && sudo docker push $t
42
-
43
- # Run
44
- # t=ultralytics/ultralytics:latest-conda && sudo docker run -it --ipc=host $t
45
-
46
- # Pull and Run
47
- # t=ultralytics/ultralytics:latest-conda && sudo docker pull $t && sudo docker run -it --ipc=host $t
48
-
49
- # Pull and Run with local volume mounted
50
- # t=ultralytics/ultralytics:latest-conda && sudo docker pull $t && sudo docker run -it --ipc=host -v "$(pwd)"/shared/datasets:/datasets $t
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docker/Dockerfile-cpu DELETED
@@ -1,62 +0,0 @@
1
- # Ultralytics YOLO πŸš€, AGPL-3.0 license
2
- # Builds ultralytics/ultralytics:latest-cpu image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics
3
- # Image is CPU-optimized for ONNX, OpenVINO and PyTorch YOLO11 deployments
4
-
5
- # Use official Python base image for reproducibility (3.11.10 for export and 3.12.6 for inference)
6
- FROM python:3.11.10-slim-bookworm
7
-
8
- # Set environment variables
9
- ENV PYTHONUNBUFFERED=1 \
10
- PYTHONDONTWRITEBYTECODE=1 \
11
- PIP_NO_CACHE_DIR=1 \
12
- PIP_BREAK_SYSTEM_PACKAGES=1
13
-
14
- # Downloads to user config dir
15
- ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
16
- https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.Unicode.ttf \
17
- /root/.config/Ultralytics/
18
-
19
- # Install linux packages
20
- # g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package
21
- RUN apt-get update && \
22
- apt-get install -y --no-install-recommends \
23
- python3-pip git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 \
24
- && rm -rf /var/lib/apt/lists/*
25
-
26
- # Create working directory
27
- WORKDIR /ultralytics
28
-
29
- # Copy contents and configure git
30
- COPY . .
31
- RUN sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config
32
- ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt .
33
-
34
- # Install pip packages
35
- RUN pip install uv
36
- RUN uv pip install --system -e ".[export]" --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-first-match
37
-
38
- # Run exports to AutoInstall packages
39
- RUN yolo export model=tmp/yolo11n.pt format=edgetpu imgsz=32
40
- RUN yolo export model=tmp/yolo11n.pt format=ncnn imgsz=32
41
- # Requires Python<=3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991
42
- RUN uv pip install --system "paddlepaddle>=2.6.0" x2paddle
43
-
44
- # Remove extra build files
45
- RUN rm -rf tmp /root/.config/Ultralytics/persistent_cache.json
46
-
47
- # Set default command to bash
48
- CMD ["/bin/bash"]
49
-
50
- # Usage Examples -------------------------------------------------------------------------------------------------------
51
-
52
- # Build and Push
53
- # t=ultralytics/ultralytics:latest-cpu && sudo docker build -f docker/Dockerfile-cpu -t $t . && sudo docker push $t
54
-
55
- # Run
56
- # t=ultralytics/ultralytics:latest-cpu && sudo docker run -it --ipc=host --name NAME $t
57
-
58
- # Pull and Run
59
- # t=ultralytics/ultralytics:latest-cpu && sudo docker pull $t && sudo docker run -it --ipc=host --name NAME $t
60
-
61
- # Pull and Run with local volume mounted
62
- # t=ultralytics/ultralytics:latest-cpu && sudo docker pull $t && sudo docker run -it --ipc=host -v "$(pwd)"/shared/datasets:/datasets $t
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docker/Dockerfile-jetson-jetpack4 DELETED
@@ -1,70 +0,0 @@
1
- # Ultralytics YOLO πŸš€, AGPL-3.0 license
2
- # Builds ultralytics/ultralytics:jetson-jetpack4 image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics
3
- # Supports JetPack4.x for YOLO11 on Jetson Nano, TX2, Xavier NX, AGX Xavier
4
-
5
- # Start FROM https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-cuda
6
- FROM nvcr.io/nvidia/l4t-cuda:10.2.460-runtime
7
-
8
- # Set environment variables
9
- ENV PYTHONUNBUFFERED=1 \
10
- PYTHONDONTWRITEBYTECODE=1
11
-
12
- # Downloads to user config dir
13
- ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
14
- https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.Unicode.ttf \
15
- /root/.config/Ultralytics/
16
-
17
- # Add NVIDIA repositories for TensorRT dependencies
18
- RUN wget -q -O - https://repo.download.nvidia.com/jetson/jetson-ota-public.asc | apt-key add - && \
19
- echo "deb https://repo.download.nvidia.com/jetson/common r32.7 main" > /etc/apt/sources.list.d/nvidia-l4t-apt-source.list && \
20
- echo "deb https://repo.download.nvidia.com/jetson/t194 r32.7 main" >> /etc/apt/sources.list.d/nvidia-l4t-apt-source.list
21
-
22
- # Install dependencies
23
- RUN apt-get update && \
24
- apt-get install -y --no-install-recommends \
25
- git python3.8 python3.8-dev python3-pip python3-libnvinfer libopenmpi-dev libopenblas-base libomp-dev gcc \
26
- && rm -rf /var/lib/apt/lists/*
27
-
28
- # Create symbolic links for python3.8 and pip3
29
- RUN ln -sf /usr/bin/python3.8 /usr/bin/python3
30
- RUN ln -s /usr/bin/pip3 /usr/bin/pip
31
-
32
- # Create working directory
33
- WORKDIR /ultralytics
34
-
35
- # Copy contents and configure git
36
- COPY . .
37
- RUN sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config
38
- ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt .
39
-
40
- # Download onnxruntime-gpu 1.8.0 and tensorrt 8.2.0.6
41
- # Other versions can be seen in https://elinux.org/Jetson_Zoo and https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048
42
- ADD https://nvidia.box.com/shared/static/gjqofg7rkg97z3gc8jeyup6t8n9j8xjw.whl onnxruntime_gpu-1.8.0-cp38-cp38-linux_aarch64.whl
43
- ADD https://forums.developer.nvidia.com/uploads/short-url/hASzFOm9YsJx6VVFrDW1g44CMmv.whl tensorrt-8.2.0.6-cp38-none-linux_aarch64.whl
44
-
45
- # Install pip packages
46
- RUN python3 -m pip install --upgrade pip
47
- RUN python3 -m pip install uv
48
- RUN uv pip install --system \
49
- onnxruntime_gpu-1.8.0-cp38-cp38-linux_aarch64.whl \
50
- tensorrt-8.2.0.6-cp38-none-linux_aarch64.whl \
51
- https://github.com/ultralytics/assets/releases/download/v0.0.0/torch-1.11.0a0+gitbc2c6ed-cp38-cp38-linux_aarch64.whl \
52
- https://github.com/ultralytics/assets/releases/download/v0.0.0/torchvision-0.12.0a0+9b5a3fe-cp38-cp38-linux_aarch64.whl
53
- RUN uv pip install --system -e ".[export]"
54
-
55
- # Remove extra build files
56
- RUN rm -rf *.whl /root/.config/Ultralytics/persistent_cache.json
57
-
58
- # Usage Examples -------------------------------------------------------------------------------------------------------
59
-
60
- # Build and Push
61
- # t=ultralytics/ultralytics:latest-jetson-jetpack4 && sudo docker build --platform linux/arm64 -f docker/Dockerfile-jetson-jetpack4 -t $t . && sudo docker push $t
62
-
63
- # Run
64
- # t=ultralytics/ultralytics:latest-jetson-jetpack4 && sudo docker run -it --ipc=host $t
65
-
66
- # Pull and Run
67
- # t=ultralytics/ultralytics:latest-jetson-jetpack4 && sudo docker pull $t && sudo docker run -it --ipc=host $t
68
-
69
- # Pull and Run with NVIDIA runtime
70
- # t=ultralytics/ultralytics:latest-jetson-jetpack4 && sudo docker pull $t && sudo docker run -it --ipc=host --runtime=nvidia $t
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docker/Dockerfile-jetson-jetpack5 DELETED
@@ -1,57 +0,0 @@
1
- # Ultralytics YOLO πŸš€, AGPL-3.0 license
2
- # Builds ultralytics/ultralytics:jetson-jetson-jetpack5 image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics
3
- # Supports JetPack5.1.2 for YOLO11 on Jetson Xavier NX, AGX Xavier, AGX Orin, Orin Nano and Orin NX
4
-
5
- # Start FROM https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-jetpack
6
- FROM nvcr.io/nvidia/l4t-jetpack:r35.4.1
7
-
8
- # Set environment variables
9
- ENV PYTHONUNBUFFERED=1 \
10
- PYTHONDONTWRITEBYTECODE=1 \
11
- PIP_NO_CACHE_DIR=1 \
12
- PIP_BREAK_SYSTEM_PACKAGES=1
13
-
14
- # Downloads to user config dir
15
- ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
16
- https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.Unicode.ttf \
17
- /root/.config/Ultralytics/
18
-
19
- # Install dependencies
20
- RUN apt-get update && \
21
- apt-get install -y --no-install-recommends \
22
- git python3-pip libopenmpi-dev libopenblas-base libomp-dev \
23
- && rm -rf /var/lib/apt/lists/*
24
-
25
- # Create working directory
26
- WORKDIR /ultralytics
27
-
28
- # Copy contents and configure git
29
- COPY . .
30
- RUN sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config
31
- ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt .
32
-
33
- # Pip install onnxruntime-gpu, torch, torchvision and ultralytics
34
- RUN python3 -m pip install --upgrade pip uv
35
- RUN uv pip install --system \
36
- https://github.com/ultralytics/assets/releases/download/v0.0.0/onnxruntime_gpu-1.18.0-cp38-cp38-linux_aarch64.whl \
37
- https://github.com/ultralytics/assets/releases/download/v0.0.0/torch-2.1.0a0+41361538.nv23.06-cp38-cp38-linux_aarch64.whl \
38
- https://github.com/ultralytics/assets/releases/download/v0.0.0/torchvision-0.16.2+c6f3977-cp38-cp38-linux_aarch64.whl
39
-
40
- RUN uv pip install --system -e ".[export]"
41
-
42
- # Remove extra build files
43
- RUN rm -rf *.whl /root/.config/Ultralytics/persistent_cache.json
44
-
45
- # Usage Examples -------------------------------------------------------------------------------------------------------
46
-
47
- # Build and Push
48
- # t=ultralytics/ultralytics:latest-jetson-jetpack5 && sudo docker build --platform linux/arm64 -f docker/Dockerfile-jetson-jetpack5 -t $t . && sudo docker push $t
49
-
50
- # Run
51
- # t=ultralytics/ultralytics:latest-jetson-jetpack5 && sudo docker run -it --ipc=host $t
52
-
53
- # Pull and Run
54
- # t=ultralytics/ultralytics:latest-jetson-jetpack5 && sudo docker pull $t && sudo docker run -it --ipc=host $t
55
-
56
- # Pull and Run with NVIDIA runtime
57
- # t=ultralytics/ultralytics:latest-jetson-jetpack5 && sudo docker pull $t && sudo docker run -it --ipc=host --runtime=nvidia $t
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docker/Dockerfile-jetson-jetpack6 DELETED
@@ -1,58 +0,0 @@
1
- # Ultralytics YOLO πŸš€, AGPL-3.0 license
2
- # Builds ultralytics/ultralytics:jetson-jetpack6 image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics
3
- # Supports JetPack6.1 for YOLO11 on Jetson AGX Orin, Orin NX and Orin Nano Series
4
-
5
- # Start FROM https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-jetpack
6
- FROM nvcr.io/nvidia/l4t-jetpack:r36.4.0
7
-
8
- # Set environment variables
9
- ENV PYTHONUNBUFFERED=1 \
10
- PYTHONDONTWRITEBYTECODE=1 \
11
- PIP_NO_CACHE_DIR=1 \
12
- PIP_BREAK_SYSTEM_PACKAGES=1
13
-
14
- # Downloads to user config dir
15
- ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
16
- https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.Unicode.ttf \
17
- /root/.config/Ultralytics/
18
-
19
- # Install dependencies
20
- ADD https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/arm64/cuda-keyring_1.1-1_all.deb .
21
- RUN dpkg -i cuda-keyring_1.1-1_all.deb && \
22
- apt-get update && \
23
- apt-get install -y --no-install-recommends \
24
- git python3-pip libopenmpi-dev libopenblas-base libomp-dev libcusparselt0 libcusparselt-dev \
25
- && rm -rf /var/lib/apt/lists/*
26
-
27
- # Create working directory
28
- WORKDIR /ultralytics
29
-
30
- # Copy contents and configure git
31
- COPY . .
32
- RUN sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config
33
- ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt .
34
-
35
- # Pip install onnxruntime-gpu, torch, torchvision and ultralytics
36
- RUN python3 -m pip install --upgrade pip uv
37
- RUN uv pip install --system \
38
- https://github.com/ultralytics/assets/releases/download/v0.0.0/onnxruntime_gpu-1.20.0-cp310-cp310-linux_aarch64.whl \
39
- https://github.com/ultralytics/assets/releases/download/v0.0.0/torch-2.5.0a0+872d972e41.nv24.08-cp310-cp310-linux_aarch64.whl \
40
- https://github.com/ultralytics/assets/releases/download/v0.0.0/torchvision-0.20.0a0+afc54f7-cp310-cp310-linux_aarch64.whl
41
- RUN uv pip install --system -e ".[export]"
42
-
43
- # Remove extra build files
44
- RUN rm -rf *.whl /root/.config/Ultralytics/persistent_cache.json
45
-
46
- # Usage Examples -------------------------------------------------------------------------------------------------------
47
-
48
- # Build and Push
49
- # t=ultralytics/ultralytics:latest-jetson-jetpack6 && sudo docker build --platform linux/arm64 -f docker/Dockerfile-jetson-jetpack6 -t $t . && sudo docker push $t
50
-
51
- # Run
52
- # t=ultralytics/ultralytics:latest-jetson-jetpack6 && sudo docker run -it --ipc=host $t
53
-
54
- # Pull and Run
55
- # t=ultralytics/ultralytics:latest-jetson-jetpack6 && sudo docker pull $t && sudo docker run -it --ipc=host $t
56
-
57
- # Pull and Run with NVIDIA runtime
58
- # t=ultralytics/ultralytics:latest-jetson-jetpack6 && sudo docker pull $t && sudo docker run -it --ipc=host --runtime=nvidia $t
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docker/Dockerfile-jupyter DELETED
@@ -1,33 +0,0 @@
1
- # Ultralytics YOLO πŸš€, AGPL-3.0 license
2
- # Builds ultralytics/ultralytics:latest-jupyter image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics
3
- # Image provides JupyterLab interface for interactive YOLO development and includes tutorial notebooks
4
-
5
- # Start from Python-based Ultralytics image for full Python environment
6
- FROM ultralytics/ultralytics:latest-python
7
-
8
- # Install JupyterLab for interactive development
9
- RUN uv pip install --system jupyterlab
10
-
11
- # Create persistent data directory structure
12
- RUN mkdir /data
13
-
14
- # Configure YOLO directories
15
- RUN mkdir /data/{datasets,weights,runs} && \
16
- yolo settings datasets_dir="/data/datasets" weights_dir="/data/weights" runs_dir="/data/runs"
17
-
18
- # Start JupyterLab with tutorial notebook
19
- ENTRYPOINT ["/usr/local/bin/jupyter", "lab", "--allow-root", "--ip=*", "/ultralytics/examples/tutorial.ipynb"]
20
-
21
- # Usage Examples -------------------------------------------------------------------------------------------------------
22
-
23
- # Build and Push
24
- # t=ultralytics/ultralytics:latest-jupyter && sudo docker build -f docker/Dockerfile-jupyter -t $t . && sudo docker push $t
25
-
26
- # Run
27
- # t=ultralytics/ultralytics:latest-jupyter && sudo docker run -it --ipc=host -p 8888:8888 $t
28
-
29
- # Pull and Run
30
- # t=ultralytics/ultralytics:latest-jupyter && sudo docker pull $t && sudo docker run -it --ipc=host -p 8888:8888 $t
31
-
32
- # Pull and Run with local volume mounted
33
- # t=ultralytics/ultralytics:latest-jupyter && sudo docker pull $t && sudo docker run -it --ipc=host -p 8888:8888 -v "$(pwd)"/datasets:/data/datasets $t
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docker/Dockerfile-python DELETED
@@ -1,59 +0,0 @@
1
- # Ultralytics YOLO πŸš€, AGPL-3.0 license
2
- # Builds ultralytics/ultralytics:latest-cpu image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics
3
- # Image is CPU-optimized for ONNX, OpenVINO and PyTorch YOLO11 deployments
4
-
5
- # Use official Python base image for reproducibility (3.11.10 for export and 3.12.6 for inference)
6
- FROM python:3.11.10-slim-bookworm
7
-
8
- # Set environment variables
9
- ENV PYTHONUNBUFFERED=1 \
10
- PYTHONDONTWRITEBYTECODE=1 \
11
- PIP_NO_CACHE_DIR=1 \
12
- PIP_BREAK_SYSTEM_PACKAGES=1
13
-
14
- # Downloads to user config dir
15
- ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
16
- https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.Unicode.ttf \
17
- /root/.config/Ultralytics/
18
-
19
- # Install linux packages
20
- # g++ required to build 'tflite_support' and 'lap' packages, libusb-1.0-0 required for 'tflite_support' package
21
- RUN apt-get update && \
22
- apt-get install -y --no-install-recommends \
23
- python3-pip git zip unzip wget curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0 \
24
- && rm -rf /var/lib/apt/lists/*
25
-
26
- # Create working directory
27
- WORKDIR /ultralytics
28
-
29
- # Copy contents and configure git
30
- COPY . .
31
- RUN sed -i '/^\[http "https:\/\/github\.com\/"\]/,+1d' .git/config
32
- ADD https://github.com/ultralytics/assets/releases/download/v8.3.0/yolo11n.pt .
33
-
34
- # Install pip packages
35
- RUN pip install uv
36
- RUN uv pip install --system -e ".[export]" --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-first-match
37
-
38
- # Run exports to AutoInstall packages
39
- RUN yolo export model=tmp/yolo11n.pt format=edgetpu imgsz=32
40
- RUN yolo export model=tmp/yolo11n.pt format=ncnn imgsz=32
41
- # Requires Python<=3.10, bug with paddlepaddle==2.5.0 https://github.com/PaddlePaddle/X2Paddle/issues/991
42
- RUN uv pip install --system "paddlepaddle>=2.6.0" x2paddle
43
-
44
- # Remove extra build files
45
- RUN rm -rf tmp /root/.config/Ultralytics/persistent_cache.json
46
-
47
- # Usage Examples -------------------------------------------------------------------------------------------------------
48
-
49
- # Build and Push
50
- # t=ultralytics/ultralytics:latest-python && sudo docker build -f docker/Dockerfile-python -t $t . && sudo docker push $t
51
-
52
- # Run
53
- # t=ultralytics/ultralytics:latest-python && sudo docker run -it --ipc=host $t
54
-
55
- # Pull and Run
56
- # t=ultralytics/ultralytics:latest-python && sudo docker pull $t && sudo docker run -it --ipc=host $t
57
-
58
- # Pull and Run with local volume mounted
59
- # t=ultralytics/ultralytics:latest-python && sudo docker pull $t && sudo docker run -it --ipc=host -v "$(pwd)"/shared/datasets:/datasets $t
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docker/Dockerfile-runner DELETED
@@ -1,44 +0,0 @@
1
- # Ultralytics YOLO πŸš€, AGPL-3.0 license
2
- # Builds GitHub actions CI runner image for deployment to DockerHub https://hub.docker.com/r/ultralytics/ultralytics
3
- # Image is CUDA-optimized for YOLO11 single/multi-GPU training and inference tests
4
-
5
- # Start FROM Ultralytics GPU image
6
- FROM ultralytics/ultralytics:latest
7
-
8
- # Set environment variables
9
- ENV PYTHONUNBUFFERED=1 \
10
- PYTHONDONTWRITEBYTECODE=1 \
11
- PIP_NO_CACHE_DIR=1 \
12
- PIP_BREAK_SYSTEM_PACKAGES=1 \
13
- RUNNER_ALLOW_RUNASROOT=1 \
14
- DEBIAN_FRONTEND=noninteractive
15
-
16
- # Set the working directory
17
- WORKDIR /actions-runner
18
-
19
- # Download and unpack the latest runner from https://github.com/actions/runner
20
- RUN FILENAME=actions-runner-linux-x64-2.320.0.tar.gz && \
21
- curl -o $FILENAME -L https://github.com/actions/runner/releases/download/v2.320.0/$FILENAME && \
22
- tar xzf $FILENAME && \
23
- rm $FILENAME
24
-
25
- # Install runner dependencies
26
- RUN uv pip install --system pytest-cov
27
- RUN ./bin/installdependencies.sh && \
28
- apt-get -y install libicu-dev
29
-
30
- # Inline ENTRYPOINT command to configure and start runner with default TOKEN and NAME
31
- ENTRYPOINT sh -c './config.sh --url https://github.com/ultralytics/ultralytics \
32
- --token ${GITHUB_RUNNER_TOKEN:-TOKEN} \
33
- --name ${GITHUB_RUNNER_NAME:-NAME} \
34
- --labels gpu-latest \
35
- --replace && \
36
- ./run.sh'
37
-
38
- # Usage Examples -------------------------------------------------------------------------------------------------------
39
-
40
- # Build and Push
41
- # t=ultralytics/ultralytics:latest-runner && sudo docker build -f docker/Dockerfile-runner -t $t . && sudo docker push $t
42
-
43
- # Pull and Run in detached mode with access to GPUs 0 and 1
44
- # t=ultralytics/ultralytics:latest-runner && sudo docker run -d -e GITHUB_RUNNER_TOKEN=TOKEN -e GITHUB_RUNNER_NAME=NAME --ipc=host --gpus '"device=0,1"' $t