Skip to content

Commit

Permalink
ultralytics 8.3.73 GitHub Container Registry Images at ghcr.io (#…
Browse files Browse the repository at this point in the history
…19114)

Signed-off-by: Glenn Jocher <[email protected]>
Co-authored-by: UltralyticsAssistant <[email protected]>
  • Loading branch information
glenn-jocher and UltralyticsAssistant authored Feb 7, 2025
1 parent 949240f commit 35f0fde
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-15, windows-latest, ubuntu-24.04-arm]
os: [ubuntu-latest, macos-15, windows-latest]
python-version: ["3.11"]
torch: [latest]
include:
Expand Down
61 changes: 45 additions & 16 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ on:
default: true
push:
type: boolean
description: Publish all Images to Docker Hub
description: Publish all Images

jobs:
docker:
Expand Down Expand Up @@ -105,6 +105,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Retrieve Ultralytics version
id: get_version
run: |
Expand Down Expand Up @@ -141,12 +148,17 @@ jobs:
retry_delay_seconds: 60
retries: 2
run: |
docker build \
--platform ${{ matrix.platforms }} \
-f docker/${{ matrix.dockerfile }} \
-t ultralytics/ultralytics:${{ matrix.tags }} \
-t ultralytics/ultralytics:${{ steps.get_version.outputs.version_tag }} \
.
docker buildx build \
--platform ${{ matrix.platforms }} \
--label "org.opencontainers.image.source=https://github.com/ultralytics/ultralytics" \
--label "org.opencontainers.image.description=Ultralytics image" \
--label "org.opencontainers.image.licenses=AGPL-3.0-or-later" \
-f docker/${{ matrix.dockerfile }} \
-t ultralytics/ultralytics:${{ matrix.tags }} \
-t ultralytics/ultralytics:${{ steps.get_version.outputs.version_tag }} \
-t ghcr.io/ultralytics/ultralytics:${{ matrix.tags }} \
-t ghcr.io/ultralytics/ultralytics:${{ steps.get_version.outputs.version_tag }} \
.
- name: Run Tests
if: (github.event_name == 'push' || github.event.inputs[matrix.dockerfile] == 'true') && matrix.platforms == 'linux/amd64' && matrix.dockerfile != 'Dockerfile-conda' # arm64 images not supported on GitHub CI runners
Expand All @@ -165,29 +177,46 @@ jobs:
retry_delay_seconds: 300
retries: 2
run: |
docker push ultralytics/ultralytics:${{ steps.get_version.outputs.version_tag }}
t="ultralytics/ultralytics:${{ steps.get_version.outputs.version_tag }}"
docker push $t
docker push ghcr.io/$t
- name: Push Docker Image with latest tag
- name: Build and Push Additional Images (latest-runner and latest-jupyter)
if: github.event_name == 'push' || (github.event.inputs[matrix.dockerfile] == 'true' && github.event.inputs.push == 'true')
uses: ultralytics/actions/retry@main
with:
timeout_minutes: 15
retry_delay_seconds: 300
retries: 2
run: |
docker push ultralytics/ultralytics:${{ matrix.tags }}
t="ultralytics/ultralytics:${{ matrix.tags }}"
docker push $t
docker push ghcr.io/$t
if [[ "${{ matrix.tags }}" == "latest" ]]; then
t=ultralytics/ultralytics:latest-runner
docker build -f docker/Dockerfile-runner -t $t .
t="ultralytics/ultralytics:latest-runner"
docker build -f docker/Dockerfile-runner -t $t -t ghcr.io/$t \
--label "org.opencontainers.image.source=https://github.com/ultralytics/ultralytics" \
--label "org.opencontainers.image.description=Ultralytics runner image" \
--label "org.opencontainers.image.licenses=AGPL-3.0-or-later" \
.
docker push $t
docker push ghcr.io/$t
fi
if [[ "${{ matrix.tags }}" == "latest-python" ]]; then
t=ultralytics/ultralytics:latest-jupyter
v=ultralytics/ultralytics:${{ steps.get_version.outputs.version }}-jupyter
docker build -f docker/Dockerfile-jupyter -t $t -t $v .
t="ultralytics/ultralytics:latest-jupyter"
v="ultralytics/ultralytics:${{ steps.get_version.outputs.version }}-jupyter"
docker build -f docker/Dockerfile-jupyter -t $t -t ghcr.io/$t -t $v -t ghcr.io/$v \
--label "org.opencontainers.image.source=https://github.com/ultralytics/ultralytics" \
--label "org.opencontainers.image.description=Ultralytics Jupyter image" \
--label "org.opencontainers.image.licenses=AGPL-3.0-or-later" \
.
docker push $t
if [[ "${{ steps.check_tag.outputs.new_release }}" == "true" ]]; then
docker push ghcr.io/$t
if [[ "${{ steps.check_tag_dockerhub.outputs.new_release }}" == "true" ]]; then
docker push $v
docker push ghcr.io/$v
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion ultralytics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

__version__ = "8.3.72"
__version__ = "8.3.73"

import os

Expand Down

0 comments on commit 35f0fde

Please sign in to comment.