Skip to content

Commit

Permalink
fix: docker build push (#714)
Browse files Browse the repository at this point in the history
* fix: mintor revision

* fix: if run

* fix: cache

* fix: clean debug

* fix: add tensorrt tag
  • Loading branch information
numb3r3 authored May 12, 2022
1 parent a2b6d33 commit 71d2c86
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/force-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
required: false
default: MANUAL


jobs:
token-check:
runs-on: ubuntu-latest
Expand All @@ -26,7 +27,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pip_tag: [ "", "onnx"] # default: "" = torch
pip_tag: ["", "onnx", "tensorrt"] # default: "" = torch
engine_tag: ["", "cuda"] # default: "" = cpu
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -74,11 +75,8 @@ jobs:
jinaai/clip_executor:${CAS_VERSION}${PIP_TAG}${ENGINE_TAG} \
" >> $GITHUB_ENV
else
# test
echo "Debugging Workflow!"
echo "TAG_ALIAS=\
jinaai/clip_executor:${CAS_VERSION}${PIP_TAG}${ENGINE_TAG} \
" >> $GITHUB_ENV
echo "Bad triggered_by: ${{ github.event.inputs.triggered_by }}!"
exit 1
fi
echo "CAS_VERSION=${CAS_VERSION}" >> $GITHUB_ENV
Expand All @@ -99,12 +97,15 @@ jobs:
docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-aarch64
docker run --rm --privileged tonistiigi/binfmt --install all
- name: CPU Build and push
id: base_docker_build
if: ${{ matrix.engine_tag == '' }} && ${{ matrix.pip_tag != 'tensorrt' }}
uses: docker/build-push-action@v2
if: ${{ matrix.engine_tag }} == ''
with:
context: .
file: Dockerfiles/base.Dockerfile
platforms: linux/amd64
cache-from: type=registry,ref=jinaai/clip_executor:latest
cache-to: type=inline
push: true
tags: ${{env.TAG_ALIAS}}
build-args: |
Expand All @@ -113,12 +114,15 @@ jobs:
VCS_REF=${{env.VCS_REF}}
PIP_TAG=${{matrix.pip_tag}}
- name: CUDA Build and push
id: cuda_docker_build
if: ${{ matrix.engine_tag == 'cuda' }}
uses: docker/build-push-action@v2
if: ${{ matrix.engine_tag }} == 'cuda'
with:
context: .
file: Dockerfiles/cuda.Dockerfile
platforms: linux/amd64
cache-from: type=registry,ref=jinaai/clip_executor:latest-cuda
cache-to: type=inline
push: true
tags: ${{env.TAG_ALIAS}}
build-args: |
Expand Down

0 comments on commit 71d2c86

Please sign in to comment.