libretranslate-api/.gitlab-ci.yml

37 lines
1.4 KiB
YAML
Raw Normal View History

2024-04-18 15:47:30 +00:00
image: docker:dind
services:
- docker:dind
2024-06-19 22:37:02 +00:00
stages:
- build_amd64
- build_arm64
2024-04-18 15:47:30 +00:00
before_script:
- docker -v
2024-06-19 22:37:02 +00:00
build_amd64:
2024-06-19 22:42:23 +00:00
stage: build_amd64
2024-06-19 23:08:56 +00:00
needs: []
2024-04-18 15:53:05 +00:00
before_script:
- git submodule update --init --recursive
2024-04-18 15:47:30 +00:00
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
2024-07-05 12:28:13 +00:00
- docker buildx build --build-arg "with_models=true" -t libretranslate:amd64 -f LibreTranslate/docker/Dockerfile LibreTranslate/
2024-06-20 10:13:53 +00:00
- docker tag libretranslate:amd64 $CI_REGISTRY/manalejandro/libretranslate-api/libretranslate-api:amd64
- docker tag libretranslate:amd64 $CI_REGISTRY/manalejandro/libretranslate-api/libretranslate-api:latest
- docker push $CI_REGISTRY/manalejandro/libretranslate-api/libretranslate-api:amd64
2024-04-18 15:47:30 +00:00
- docker push $CI_REGISTRY/manalejandro/libretranslate-api/libretranslate-api:latest
2024-06-19 22:37:02 +00:00
build_arm64:
2024-06-19 22:42:23 +00:00
stage: build_arm64
2024-06-19 23:08:56 +00:00
needs: []
2024-06-19 22:37:02 +00:00
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
2024-07-05 12:28:13 +00:00
- docker buildx build --platform arm64 --build-arg "with_models=true" -t libretranslate:arm64 -f LibreTranslate/docker/arm.Dockerfile LibreTranslate/
2024-06-19 23:08:56 +00:00
- docker tag libretranslate:arm64 $CI_REGISTRY/manalejandro/libretranslate-api/libretranslate-api:arm64
- docker push $CI_REGISTRY/manalejandro/libretranslate-api/libretranslate-api:arm64