From b072367af34e774cfee0d2c8d88d2dce9dc469ef Mon Sep 17 00:00:00 2001 From: ZiniuYu Date: Wed, 9 Nov 2022 00:17:09 +0800 Subject: [PATCH 1/3] fix: install transformers for torch executor docker images --- Dockerfiles/base.Dockerfile | 4 ++-- Dockerfiles/cuda.Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfiles/base.Dockerfile b/Dockerfiles/base.Dockerfile index 10a298ac6..4c006ecf4 100644 --- a/Dockerfiles/base.Dockerfile +++ b/Dockerfiles/base.Dockerfile @@ -21,8 +21,8 @@ COPY . /cas/ WORKDIR /cas -RUN if [ "${BACKEND_TAG}" != "torch" ]; then python3 -m pip install --no-cache-dir "./[${BACKEND_TAG}]" ; fi \ - && python3 -m pip install --no-cache-dir . +RUN if [ "${BACKEND_TAG}" != "torch" ]; then python3 -m pip install --no-cache-dir "./[${BACKEND_TAG}]" ; \ + else python3 -m pip install --no-cache-dir "./[transformers]" ; fi && python3 -m pip install --no-cache-dir . RUN echo "\ jtype: CLIPEncoder\n\ diff --git a/Dockerfiles/cuda.Dockerfile b/Dockerfiles/cuda.Dockerfile index 33090d84d..799b7a7e8 100644 --- a/Dockerfiles/cuda.Dockerfile +++ b/Dockerfiles/cuda.Dockerfile @@ -27,8 +27,8 @@ COPY . /cas/ WORKDIR /cas -RUN if [ "${BACKEND_TAG}" != "torch" ]; then python3 -m pip install --no-cache-dir "./[${BACKEND_TAG}]" ; fi \ - && python3 -m pip install --no-cache-dir . +RUN if [ "${BACKEND_TAG}" != "torch" ]; then python3 -m pip install --no-cache-dir "./[${BACKEND_TAG}]" ; \ + else python3 -m pip install --no-cache-dir "./[transformers]" ; fi && python3 -m pip install --no-cache-dir . RUN echo "\ jtype: CLIPEncoder\n\ From d33e103f3a44a0c4a11c60c5d95fa3c4dd497f0f Mon Sep 17 00:00:00 2001 From: ZiniuYu Date: Wed, 9 Nov 2022 12:18:03 +0800 Subject: [PATCH 2/3] fix: bump jina version and install transformers in onnx --- Dockerfiles/base.Dockerfile | 4 ++-- Dockerfiles/cuda.Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfiles/base.Dockerfile b/Dockerfiles/base.Dockerfile index 4c006ecf4..10a298ac6 100644 --- a/Dockerfiles/base.Dockerfile +++ b/Dockerfiles/base.Dockerfile @@ -21,8 +21,8 @@ COPY . /cas/ WORKDIR /cas -RUN if [ "${BACKEND_TAG}" != "torch" ]; then python3 -m pip install --no-cache-dir "./[${BACKEND_TAG}]" ; \ - else python3 -m pip install --no-cache-dir "./[transformers]" ; fi && python3 -m pip install --no-cache-dir . +RUN if [ "${BACKEND_TAG}" != "torch" ]; then python3 -m pip install --no-cache-dir "./[${BACKEND_TAG}]" ; fi \ + && python3 -m pip install --no-cache-dir . RUN echo "\ jtype: CLIPEncoder\n\ diff --git a/Dockerfiles/cuda.Dockerfile b/Dockerfiles/cuda.Dockerfile index 799b7a7e8..33090d84d 100644 --- a/Dockerfiles/cuda.Dockerfile +++ b/Dockerfiles/cuda.Dockerfile @@ -27,8 +27,8 @@ COPY . /cas/ WORKDIR /cas -RUN if [ "${BACKEND_TAG}" != "torch" ]; then python3 -m pip install --no-cache-dir "./[${BACKEND_TAG}]" ; \ - else python3 -m pip install --no-cache-dir "./[transformers]" ; fi && python3 -m pip install --no-cache-dir . +RUN if [ "${BACKEND_TAG}" != "torch" ]; then python3 -m pip install --no-cache-dir "./[${BACKEND_TAG}]" ; fi \ + && python3 -m pip install --no-cache-dir . RUN echo "\ jtype: CLIPEncoder\n\ From bb0e6a5a4e78fd3165f937d1a96aa1b1ffb3a5a5 Mon Sep 17 00:00:00 2001 From: ZiniuYu Date: Wed, 9 Nov 2022 13:20:07 +0800 Subject: [PATCH 3/3] fix: increase timeout ready for executor docker images --- Dockerfiles/base.Dockerfile | 2 +- Dockerfiles/cuda.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfiles/base.Dockerfile b/Dockerfiles/base.Dockerfile index 10a298ac6..286d3de88 100644 --- a/Dockerfiles/base.Dockerfile +++ b/Dockerfiles/base.Dockerfile @@ -32,4 +32,4 @@ metas:\n\ " > /tmp/config.yml -ENTRYPOINT ["jina", "executor", "--uses", "/tmp/config.yml"] +ENTRYPOINT ["jina", "executor", "--uses", "/tmp/config.yml", "--timeout-ready", "3000000"] diff --git a/Dockerfiles/cuda.Dockerfile b/Dockerfiles/cuda.Dockerfile index 33090d84d..1b2c06b67 100644 --- a/Dockerfiles/cuda.Dockerfile +++ b/Dockerfiles/cuda.Dockerfile @@ -37,7 +37,7 @@ metas:\n\ - clip_server.executors.clip_$BACKEND_TAG\n\ " > /tmp/config.yml -ENTRYPOINT ["jina", "executor", "--uses", "/tmp/config.yml"] +ENTRYPOINT ["jina", "executor", "--uses", "/tmp/config.yml", "--timeout-ready", "3000000"]