cuda docker image

This commit is contained in:
ale 2024-06-20 01:08:56 +02:00
parent 57780236bb
commit 3ea6018528

View File

@ -6,12 +6,14 @@ services:
stages:
- build_amd64
- build_arm64
- build_cuda
before_script:
- docker -v
build_amd64:
stage: build_amd64
needs: []
before_script:
- git submodule update --init --recursive
script:
@ -22,11 +24,23 @@ build_amd64:
build_arm64:
stage: build_arm64
needs: []
before_script:
- git submodule update --init --recursive
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker buildx build --platform arm64 --build-arg "with_models=true" -t libretranslate-arm64 ./LibreTranslate
- docker tag libretranslate-arm64 $CI_REGISTRY/manalejandro/libretranslate-api/libretranslate-api-arm64:latest
- docker push $CI_REGISTRY/manalejandro/libretranslate-api/libretranslate-api-arm64:latest
- docker buildx build --platform arm64 --build-arg "with_models=true" -t libretranslate:arm64 -f LibreTranslate/docker/arm.Dockerfile LibreTranslate/
- docker tag libretranslate:arm64 $CI_REGISTRY/manalejandro/libretranslate-api/libretranslate-api:arm64
- docker push $CI_REGISTRY/manalejandro/libretranslate-api/libretranslate-api:arm64
build_cuda:
stage: build_cuda
needs: []
before_script:
- git submodule update --init --recursive
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker buildx build --build-arg "with_models=true" -t libretranslate:cuda -f LibreTranslate/docker/cuda.Dockerfile LibreTranslate/
- docker tag libretranslate:cuda $CI_REGISTRY/manalejandro/libretranslate-api/libretranslate-api:cuda
- docker push $CI_REGISTRY/manalejandro/libretranslate-api/libretranslate-api:cuda