mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-12-18 08:27:03 +02:00
commit
0b0e191c8b
12
.github/workflows/publish-docker.yml
vendored
12
.github/workflows/publish-docker.yml
vendored
@ -43,3 +43,15 @@ jobs:
|
||||
cache-to: type=gha,mode=max
|
||||
env:
|
||||
TAG: ${{ startsWith(github.ref, 'refs/tags/') && steps.get-variables.outputs.version || 'latest' }}
|
||||
|
||||
- name: Build and push Cuda Image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
file: ./docker/cuda.Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: ${{ steps.get-variables.outputs.gh-username-lower }}/libretranslate:${{ env.TAG }}-cuda
|
||||
push: true
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
env:
|
||||
TAG: ${{ startsWith(github.ref, 'refs/tags/') && steps.get-variables.outputs.version || 'latest' }}
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM python:3.10.9-slim-bullseye as builder
|
||||
FROM python:3.10.10-slim-bullseye as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@ -15,11 +15,12 @@ RUN python -mvenv venv && ./venv/bin/pip install --upgrade pip
|
||||
COPY . .
|
||||
|
||||
# Install package from source code, compile translations
|
||||
RUN ./venv/bin/pip install Babel==2.11.0 && ./venv/bin/python scripts/compile_locales.py \
|
||||
RUN ./venv/bin/pip install Babel==2.12.1 && ./venv/bin/python scripts/compile_locales.py \
|
||||
&& ./venv/bin/pip install torch --extra-index-url https://download.pytorch.org/whl/cpu \
|
||||
&& ./venv/bin/pip install . \
|
||||
&& ./venv/bin/pip cache purge
|
||||
|
||||
FROM python:3.10.9-slim-bullseye
|
||||
FROM python:3.10.10-slim-bullseye
|
||||
|
||||
ARG with_models=false
|
||||
ARG models=""
|
||||
|
Loading…
Reference in New Issue
Block a user