ultralytics 8.3.73 GitHub Container Registry Images at ghcr.io (#19114)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2025-02-07 17:53:06 +09:00 committed by GitHub
parent 949240f589
commit 35f0fde069
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 47 additions and 18 deletions

View file

@ -160,7 +160,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-latest, macos-15, windows-latest, ubuntu-24.04-arm] os: [ubuntu-latest, macos-15, windows-latest]
python-version: ["3.11"] python-version: ["3.11"]
torch: [latest] torch: [latest]
include: include:

View file

@ -46,7 +46,7 @@ on:
default: true default: true
push: push:
type: boolean type: boolean
description: Publish all Images to Docker Hub description: Publish all Images
jobs: jobs:
docker: docker:
@ -105,6 +105,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} 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 - name: Retrieve Ultralytics version
id: get_version id: get_version
run: | run: |
@ -141,12 +148,17 @@ jobs:
retry_delay_seconds: 60 retry_delay_seconds: 60
retries: 2 retries: 2
run: | run: |
docker build \ docker buildx build \
--platform ${{ matrix.platforms }} \ --platform ${{ matrix.platforms }} \
-f docker/${{ matrix.dockerfile }} \ --label "org.opencontainers.image.source=https://github.com/ultralytics/ultralytics" \
-t ultralytics/ultralytics:${{ matrix.tags }} \ --label "org.opencontainers.image.description=Ultralytics image" \
-t ultralytics/ultralytics:${{ steps.get_version.outputs.version_tag }} \ --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 - 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 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
@ -165,9 +177,11 @@ jobs:
retry_delay_seconds: 300 retry_delay_seconds: 300
retries: 2 retries: 2
run: | 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') if: github.event_name == 'push' || (github.event.inputs[matrix.dockerfile] == 'true' && github.event.inputs.push == 'true')
uses: ultralytics/actions/retry@main uses: ultralytics/actions/retry@main
with: with:
@ -175,19 +189,34 @@ jobs:
retry_delay_seconds: 300 retry_delay_seconds: 300
retries: 2 retries: 2
run: | 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 if [[ "${{ matrix.tags }}" == "latest" ]]; then
t=ultralytics/ultralytics:latest-runner t="ultralytics/ultralytics:latest-runner"
docker build -f docker/Dockerfile-runner -t $t . 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 $t
docker push ghcr.io/$t
fi fi
if [[ "${{ matrix.tags }}" == "latest-python" ]]; then if [[ "${{ matrix.tags }}" == "latest-python" ]]; then
t=ultralytics/ultralytics:latest-jupyter t="ultralytics/ultralytics:latest-jupyter"
v=ultralytics/ultralytics:${{ steps.get_version.outputs.version }}-jupyter v="ultralytics/ultralytics:${{ steps.get_version.outputs.version }}-jupyter"
docker build -f docker/Dockerfile-jupyter -t $t -t $v . 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 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 $v
docker push ghcr.io/$v
fi fi
fi fi

View file

@ -1,6 +1,6 @@
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
__version__ = "8.3.72" __version__ = "8.3.73"
import os import os