diff --git a/.github/workflows/public_docker_images.yml b/.github/workflows/public_docker_images.yml index 2ccdb66018..890d541c7a 100644 --- a/.github/workflows/public_docker_images.yml +++ b/.github/workflows/public_docker_images.yml @@ -42,6 +42,12 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Sanitize docker tag + run: + PREFIX_DOCKER_TAG="${{ matrix.framework }}-py${{ matrix.python }}-${{ matrix.system }}-" + PREFIX_DOCKER_TAG=$(echo PREFIX_DOCKER_TAG|sed 's/,/-/g') + echo PREFIX_DOCKER_TAG=${PREFIX_DOCKER_TAG} >> $GITHUB_ENV + - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 @@ -49,9 +55,9 @@ jobs: images: ${{ env.REGISTRY }}/${{ github.repository }} tags: | # used only on schedule event - type=schedule,pattern={{date 'YYYY-MM'}},prefix=${{ matrix.framework }}-py${{ matrix.python }}-${{ matrix.system }}- + type=schedule,pattern={{date 'YYYY-MM'}},prefix=${{ env.PREFIX_DOCKER_TAG }} # used only if a tag following semver is published - type=semver,pattern={{raw}},prefix=${{ matrix.framework }}-py${{ matrix.python }}-${{ matrix.system }}- + type=semver,pattern={{raw}},prefix=${{ env.PREFIX_DOCKER_TAG }} - name: Build Docker image id: build @@ -72,7 +78,7 @@ jobs: - name: Push Docker image # Push only if the CI is not triggered by "PR on main" - if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' + if: ${{ (github.ref == 'refs/heads/main' && github.event_name != 'pull_request') || (startsWith(github.ref, 'refs/tags') && github.event_name == 'push') }} uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 with: context: . diff --git a/README.md b/README.md index 37137b7c4a..1b5a2db23b 100644 --- a/README.md +++ b/README.md @@ -254,7 +254,7 @@ Check out our [TensorFlow.js demo](https://github.com/mindee/doctr-tfjs-demo) to ### Docker container -[We offer Docker container support for easy testing and deployment](https://github.com/mindee/doctr/pkgs/container/doctr). +We offer Docker container support for easy testing and deployment. [Here are the available docker tags.](https://github.com/mindee/doctr/pkgs/container/doctr). #### Using GPU with docTR Docker Images @@ -274,17 +274,18 @@ docker run -it --gpus all ghcr.io/mindee/doctr:tf-py3.8.18-gpu-2023-09 bash The Docker images for docTR follow a specific tag nomenclature: `-py--`. Here's a breakdown of the tag structure: - ``: `tf` (TensorFlow) or `torch` (PyTorch). -- ``: `3.8.18`, `3.9.18`, or `3.10.13`. +- ``: `3.9.18`, `3.10.13` or `3.11.8`. - ``: `cpu` or `gpu` - ``: a tag >= `v0.7.1` -- ``: e.g. `2023-09` +- ``: e.g. `2014-10` Here are examples of different image tags: | Tag | Description | |----------------------------|---------------------------------------------------| | `tf-py3.8.18-cpu-v0.7.1` | TensorFlow version `3.8.18` with docTR `v0.7.1`. | -| `torch-py3.9.18-gpu-2023-09`| PyTorch version `3.9.18` with GPU support and a monthly build from `2023-09`. | +| `tf-py3.11.8-cpu-2024-10` | TensorFlow version `3.11.8` with docTR from latest commit on `main` in `2024-10`. | +| `torch-py3.11.8-gpu-2024-10`| PyTorch version `3.11.8` with GPU support from latest commit on `main` in `2024-10`. | #### Building Docker Images Locally