1
0
mirror of https://github.com/LibreTranslate/LibreTranslate.git synced 2024-12-24 10:06:43 +02:00

Merge pull request #427 from TheTakylo/main

Fix docker cuda image build
This commit is contained in:
Piero Toffanin 2023-04-03 10:37:55 -04:00 committed by GitHub
commit 4852234636
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ jobs:
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
file: ./docker/cuda.Dockerfile file: ./docker/cuda.Dockerfile
platforms: linux/amd64,linux/arm64 platforms: linux/amd64
tags: ${{ steps.get-variables.outputs.gh-username-lower }}/libretranslate:${{ env.TAG }}-cuda tags: ${{ steps.get-variables.outputs.gh-username-lower }}/libretranslate:${{ env.TAG }}-cuda
push: true push: true
cache-from: type=gha cache-from: type=gha

View File

@ -1,7 +1,7 @@
FROM nvidia/cuda:11.2.2-devel-ubuntu20.04 FROM nvidia/cuda:11.2.2-devel-ubuntu20.04
ENV ARGOS_DEVICE_TYPE cuda ENV ARGOS_DEVICE_TYPE cuda
ARG with_models=true ARG with_models=false
ARG models="" ARG models=""
WORKDIR /app WORKDIR /app
@ -34,7 +34,7 @@ RUN if [ "$with_models" = "true" ]; then \
fi fi
# Install package from source code # Install package from source code
RUN pip3 install Babel==2.11.0 && python3 scripts/compile_locales.py \ RUN pip3 install Babel==2.12.1 && python3 scripts/compile_locales.py \
&& pip3 install . \ && pip3 install . \
&& pip3 cache purge && pip3 cache purge