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:
parent
949240f589
commit
35f0fde069
3 changed files with 47 additions and 18 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -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:
|
||||
|
|
|
|||
61
.github/workflows/docker.yml
vendored
61
.github/workflows/docker.yml
vendored
|
|
@ -46,7 +46,7 @@ on:
|
|||
default: true
|
||||
push:
|
||||
type: boolean
|
||||
description: Publish all Images to Docker Hub
|
||||
description: Publish all Images
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
|
|
@ -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: |
|
||||
|
|
@ -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
|
||||
|
|
@ -165,9 +177,11 @@ 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:
|
||||
|
|
@ -175,19 +189,34 @@ jobs:
|
|||
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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue