diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index b218a5e..5838920 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -38,6 +38,16 @@ jobs: push: true tags: ultralytics/ultralytics:latest-arm64 + - name: Build and push Jetson image + uses: docker/build-push-action@v4 + continue-on-error: true + with: + context: . + platforms: linux/arm64 + file: docker/Dockerfile-jetson + push: true + tags: ultralytics/ultralytics:latest-jetson + - name: Build and push CPU image uses: docker/build-push-action@v4 continue-on-error: true diff --git a/docker/Dockerfile b/docker/Dockerfile index 66acc38..beaff83 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -10,7 +10,7 @@ ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Aria # Install linux packages # g++ required to build 'tflite_support' package -RUN apt update +RUN apt update \ && apt install --no-install-recommends -y gcc git zip curl htop libgl1-mesa-glx libglib2.0-0 libpython3-dev gnupg g++ # RUN alias python=python3 @@ -29,7 +29,7 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt /u # Install pip packages RUN python3 -m pip install --upgrade pip wheel -RUN pip install --no-cache . albumentations comet gsutil notebook tensorboard +RUN pip install --no-cache -e . albumentations comet tensorboard # Set environment variables ENV OMP_NUM_THREADS=1 diff --git a/docker/Dockerfile-arm64 b/docker/Dockerfile-arm64 index a74de06..6c18d78 100644 --- a/docker/Dockerfile-arm64 +++ b/docker/Dockerfile-arm64 @@ -24,7 +24,7 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt /u # Install pip packages RUN python3 -m pip install --upgrade pip wheel -RUN pip install --no-cache . albumentations gsutil notebook +RUN pip install --no-cache -e . # Usage Examples ------------------------------------------------------------------------------------------------------- diff --git a/docker/Dockerfile-cpu b/docker/Dockerfile-cpu index 567c908..11b3350 100644 --- a/docker/Dockerfile-cpu +++ b/docker/Dockerfile-cpu @@ -25,8 +25,7 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt /u # Install pip packages RUN python3 -m pip install --upgrade pip wheel -RUN pip install --no-cache . albumentations gsutil notebook tensorboard \ - --extra-index-url https://download.pytorch.org/whl/cpu +RUN pip install --no-cache -e . --extra-index-url https://download.pytorch.org/whl/cpu # Usage Examples ------------------------------------------------------------------------------------------------------- diff --git a/docker/Dockerfile-jetson b/docker/Dockerfile-jetson new file mode 100644 index 0000000..a7a0775 --- /dev/null +++ b/docker/Dockerfile-jetson @@ -0,0 +1,44 @@ +# Ultralytics YOLO 🚀, AGPL-3.0 license +# Builds ultralytics/ultralytics:jetson image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics +# Supports JetPack for YOLOv8 on Jetson Nano, TX1/TX2, Xavier NX, AGX Xavier, AGX Orin, and Orin NX + +# Start FROM https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-pytorch +FROM nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3 + +# Downloads to user config dir +ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Arial.Unicode.ttf /root/.config/Ultralytics/ + +# Install linux packages +# g++ required to build 'tflite_support' package +RUN apt update \ + && apt install --no-install-recommends -y gcc git zip curl htop libgl1-mesa-glx libglib2.0-0 libpython3-dev gnupg g++ +# RUN alias python=python3 + +# Security updates +# https://security.snyk.io/vuln/SNYK-UBUNTU1804-OPENSSL-3314796 +RUN apt upgrade --no-install-recommends -y openssl tar + +# Create working directory +RUN mkdir -p /usr/src/ultralytics +WORKDIR /usr/src/ultralytics + +# Copy contents +# COPY . /usr/src/app (issues as not a .git directory) +RUN git clone https://github.com/ultralytics/ultralytics /usr/src/ultralytics +ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt /usr/src/ultralytics/ + +# Install pip packages +RUN python3 -m pip install --upgrade pip wheel +RUN pip install --no-cache -e . + +# Set environment variables +ENV OMP_NUM_THREADS=1 + + +# Usage Examples ------------------------------------------------------------------------------------------------------- + +# Build and Push +# t=ultralytics/ultralytics:jetson && sudo docker build -f docker/Dockerfile -t $t . && sudo docker push $t + +# Pull and Run +# t=ultralytics/ultralytics:jetson && sudo docker pull $t && sudo docker run -it --ipc=host $t diff --git a/ultralytics/yolo/utils/checks.py b/ultralytics/yolo/utils/checks.py index 3fadd46..5f67d2f 100644 --- a/ultralytics/yolo/utils/checks.py +++ b/ultralytics/yolo/utils/checks.py @@ -198,7 +198,7 @@ def check_python(minimum: str = '3.7.0') -> bool: @TryExcept() def check_requirements(requirements=ROOT.parent / 'requirements.txt', exclude=(), install=True, cmds=''): """ - Check if installed dependencies meet YOLOv5 requirements and attempt to auto-update if needed. + Check if installed dependencies meet YOLOv8 requirements and attempt to auto-update if needed. Args: requirements (Union[Path, str, List[str]]): Path to a requirements.txt file, a single package requirement as a