Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
odulcy-mindee committed Nov 5, 2024
1 parent 59414aa commit 01a0a5c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/public_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,22 @@ 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
with:
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
Expand All @@ -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: .
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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: `<framework>-py<python_version>-<system>-<doctr_version|YYYY-MM>`. Here's a breakdown of the tag structure:

- `<framework>`: `tf` (TensorFlow) or `torch` (PyTorch).
- `<python_version>`: `3.8.18`, `3.9.18`, or `3.10.13`.
- `<python_version>`: `3.9.18`, `3.10.13` or `3.11.8`.
- `<system>`: `cpu` or `gpu`
- `<doctr_version>`: a tag >= `v0.7.1`
- `<YYYY-MM>`: e.g. `2023-09`
- `<YYYY-MM>`: 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

Expand Down

0 comments on commit 01a0a5c

Please sign in to comment.