diff --git a/.github/workflows/force-docker-build.yml b/.github/workflows/force-docker-build.yml index b601c5ad0..7ef7d2c80 100644 --- a/.github/workflows/force-docker-build.yml +++ b/.github/workflows/force-docker-build.yml @@ -50,8 +50,10 @@ jobs: fi PIP_TAG=${{ matrix.pip_tag }} + BACKEND_TAG=torch if [ -n "${PIP_TAG}" ]; then PIP_TAG=-${PIP_TAG} + BACKEND_TAG=${PIP_TAG} fi if [[ "${{ github.event.inputs.triggered_by }}" == "CD" ]]; then @@ -80,6 +82,7 @@ jobs: fi echo "CAS_VERSION=${CAS_VERSION}" >> $GITHUB_ENV + echo "BACKEND_TAG=${BACKEND_TAG}" >> $GITHUB_ENV - name: Set up Docker Buildx id: buildx @@ -113,6 +116,7 @@ jobs: CAS_VERSION=${{env.CAS_VERSION}} VCS_REF=${{env.VCS_REF}} PIP_TAG=${{matrix.pip_tag}} + BACKEND_TAG=${{env.BACKEND_TAG}} - name: CUDA Build and push id: cuda_docker_build if: ${{ matrix.engine_tag == 'cuda' }} @@ -130,3 +134,4 @@ jobs: CAS_VERSION=${{env.CAS_VERSION}} VCS_REF=${{env.VCS_REF}} PIP_TAG=${{matrix.pip_tag}} + BACKEND_TAG=${{env.BACKEND_TAG}} \ No newline at end of file diff --git a/Dockerfiles/base.Dockerfile b/Dockerfiles/base.Dockerfile index cd60c4a79..afbdc69b1 100644 --- a/Dockerfiles/base.Dockerfile +++ b/Dockerfiles/base.Dockerfile @@ -4,7 +4,7 @@ ARG JINA_VERSION=3.3.25 FROM jinaai/jina:${JINA_VERSION}-py38-standard ARG PIP_TAG -ARG DL_ENGINE=torch +ARG BACKEND_TAG=torch # constant, wont invalidate cache LABEL org.opencontainers.image.vendor="Jina AI Limited" \ @@ -24,7 +24,7 @@ RUN echo "\ jtype: CLIPEncoder\n\ metas:\n\ py_modules:\n\ - - server/clip_server/executors/clip_$DL_ENGINE.py\n\ + - server/clip_server/executors/clip_$BACKEND_TAG.py\n\ " > /tmp/config.yml RUN cd /clip-as-service && \ diff --git a/Dockerfiles/cuda.Dockerfile b/Dockerfiles/cuda.Dockerfile index b17fa1e5a..dc6261936 100644 --- a/Dockerfiles/cuda.Dockerfile +++ b/Dockerfiles/cuda.Dockerfile @@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND=noninteractive ARG JINA_VERSION=3.3.25 ARG PIP_TAG -ARG DL_ENGINE=torch +ARG BACKEND_TAG=torch RUN apt-get update && apt-get install -y --no-install-recommends \ python3-setuptools python3-wheel python3-pip \ @@ -26,7 +26,7 @@ with:\n\ device: cuda\n\ metas:\n\ py_modules:\n\ - - server/clip_server/executors/clip_$DL_ENGINE.py\n\ + - server/clip_server/executors/clip_$BACKEND_TAG.py\n\ " > /tmp/config.yml RUN cd /clip-as-service && \