Commit 20b965cd authored by nanahira's avatar nanahira

put in one build step

parent a02297ab
stages: stages:
- prepare
- build - build
- deploy - deploy
variables: variables:
GIT_DEPTH: "1" GIT_DEPTH: "1"
prepare:
stage: prepare
tags:
- linux
script:
- apt update; apt -y install git git-lfs
- git lfs clone https://huggingface.co/spaces/hhhhardman/VITS-Umamusume-voice-synthesizer src
- cp -rf injects/Dockerfile src/
- cp -rf injects/.dockerignore src/
- sed -i "s/show_api=False, share=args.share/show_api=True, share=args.share, server_name='0.0.0.0'/" src/app.py
artifacts:
paths:
- src
.docker: .docker:
before_script: before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
...@@ -28,10 +13,13 @@ prepare: ...@@ -28,10 +13,13 @@ prepare:
.build-image: .build-image:
extends: .docker extends: .docker
stage: build stage: build
dependencies:
- prepare
script: script:
- apk add --no-cache git git-lfs
- git lfs clone https://huggingface.co/spaces/hhhhardman/VITS-Umamusume-voice-synthesizer src
- cp -rf injects/Dockerfile src/
- cp -rf injects/.dockerignore src/
- cd src - cd src
- sed -i "s/show_api=False, share=args.share/show_api=True, share=args.share, server_name='0.0.0.0'/" app.py
- docker build --pull -t $TARGET_IMAGE . - docker build --pull -t $TARGET_IMAGE .
- docker push $TARGET_IMAGE - docker push $TARGET_IMAGE
...@@ -44,7 +32,6 @@ build-x86: ...@@ -44,7 +32,6 @@ build-x86:
.deploy: .deploy:
extends: .docker extends: .docker
stage: deploy stage: deploy
dependencies: []
script: script:
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG $TARGET_IMAGE - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG $TARGET_IMAGE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment