Skip to content

Commit

Permalink
fix: gpu tag
Browse files Browse the repository at this point in the history
  • Loading branch information
numb3r3 committed Jun 14, 2022
1 parent 9250122 commit b7e7a62
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/force-hub-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,11 @@ jobs:
" > server/manifest.yml
python scripts/get-requirements.py "" server/requirements.txt
cp Dockerfiles/base.Dockerfile server/Dockerfile
cp Dockerfiles/cuda.Dockerfile server/Dockerfile.gpu
exec_name=`yq -r .name server/manifest.yml`
echo executor name is $exec_name
cp Dockerfiles/base.Dockerfile server/Dockerfile
JINA_AUTH_TOKEN=${{secrets.JINAHUB_TOKEN}} jina hub push --force $exec_name --secret ${{secrets.TORCH_EXEC_SECRET}} server ${{env.TAG_ALIAS}}
cp Dockerfiles/cuda.Dockerfile server/Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/cuda.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ metas:\n\
- clip_server/executors/clip_$BACKEND_TAG.py\n\
" > /tmp/config.yml

RUN cd /clip-as-service && \
RUN cd /clip_server && \
if [ "${BACKEND_TAG}" != "torch" ]; then python3 -m pip install --no-cache-dir "./[${BACKEND_TAG}]" ; fi && \
python3 -m pip install --no-cache-dir .

Expand Down
4 changes: 1 addition & 3 deletions Dockerfiles/tensorrt.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@ ARG BACKEND_TAG=tensorrt
RUN pip3 install --default-timeout=1000 --no-cache-dir torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
RUN pip3 -m pip install --default-timeout=1000 --no-cache-dir "jina[standard]==${JINA_VERSION}"


# copy will almost always invalid the cache
COPY . /clip_server/

RUN pip3 install --no-cache-dir "server/[$BACKEND_TAG]"

RUN echo '\
jtype: CLIPEncoder\n\
metas:\n\
py_modules:\n\
- clip_server/executors/clip_$BACKEND_TAG.py\n\
' > /tmp/config.yml

RUN cd /clip_server/ && python3 -m pip install --no-cache-dir "./[$BACKEND_TAG]"

WORKDIR /clip_server

Expand Down

0 comments on commit b7e7a62

Please sign in to comment.