Add retries to Docker pushes (#18565)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/18554/head^2
Glenn Jocher 1 month ago committed by GitHub
parent 88c5699a54
commit 4775901224
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 44
      .github/workflows/docker.yaml
  2. 7
      docker/Dockerfile-jupyter

@ -158,27 +158,37 @@ jobs:
- name: Push Docker Image with Ultralytics version tag
if: (github.event_name == 'push' || (github.event.inputs[matrix.dockerfile] == 'true' && github.event.inputs.push == 'true')) && steps.check_tag.outputs.new_release == 'true' && matrix.dockerfile != 'Dockerfile-conda'
run: |
docker push ultralytics/ultralytics:${{ steps.get_version.outputs.version_tag }}
uses: ultralytics/actions/retry@main
with:
timeout_minutes: 15
retry_delay_seconds: 300
retries: 2
run: |
docker push ultralytics/ultralytics:${{ steps.get_version.outputs.version_tag }}
- name: Push Docker Image with latest tag
if: github.event_name == 'push' || (github.event.inputs[matrix.dockerfile] == 'true' && github.event.inputs.push == 'true')
run: |
docker push ultralytics/ultralytics:${{ matrix.tags }}
if [[ "${{ matrix.tags }}" == "latest" ]]; then
t=ultralytics/ultralytics:latest-runner
docker build -f docker/Dockerfile-runner -t $t .
docker push $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 .
docker push $t
if [[ "${{ steps.check_tag.outputs.new_release }}" == "true" ]]; then
docker push $v
uses: ultralytics/actions/retry@main
with:
timeout_minutes: 15
retry_delay_seconds: 300
retries: 2
run: |
docker push ultralytics/ultralytics:${{ matrix.tags }}
if [[ "${{ matrix.tags }}" == "latest" ]]; then
t=ultralytics/ultralytics:latest-runner
docker build -f docker/Dockerfile-runner -t $t .
docker push $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 .
docker push $t
if [[ "${{ steps.check_tag.outputs.new_release }}" == "true" ]]; then
docker push $v
fi
fi
fi
trigger-actions:
runs-on: ubuntu-latest

@ -11,10 +11,9 @@ RUN uv pip install --system jupyterlab
# Create persistent data directory structure
RUN mkdir /data
# Configure YOLO directory paths
RUN mkdir /data/datasets && yolo settings datasets_dir="/data/datasets"
RUN mkdir /data/weights && yolo settings weights_dir="/data/weights"
RUN mkdir /data/runs && yolo settings runs_dir="/data/runs"
# Configure YOLO directories
RUN mkdir /data/{datasets,weights,runs} && \
yolo settings datasets_dir="/data/datasets" weights_dir="/data/weights" runs_dir="/data/runs"
# Start JupyterLab with tutorial notebook
ENTRYPOINT ["/usr/local/bin/jupyter", "lab", "--allow-root", "--ip=*", "/ultralytics/examples/tutorial.ipynb"]

Loading…
Cancel
Save