Commit 480b3ca9 authored by nanahira's avatar nanahira

first

parent f5fed0f7
stages:
- prepare
- build
- deploy
variables:
GIT_DEPTH: "1"
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
prepare:
stage: prepare
tags:
- docker
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
.build-image:
stage: build
dependencies:
- prepare
script:
- cd src
- docker build --pull -t $TARGET_IMAGE .
- docker push $TARGET_IMAGE
build-x86:
extends: .build-image
tags:
- docker
variables:
TARGET_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
.deploy:
stage: deploy
dependencies: []
tags:
- docker
script:
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG $TARGET_IMAGE
- docker push $TARGET_IMAGE
deploy_latest:
extends: .deploy
variables:
TARGET_IMAGE: $CI_REGISTRY_IMAGE:latest
only:
- master
.git*
Dockerfile
.dockerignore
FROM python:3.10-bullseye
RUN apt update && \
apt -y install cmake build-essential && \
rm -rf /var/lib/apt/lists/* /var/log/* /tmp/* /var/tmp/* /var/cache/apt/archives/*
WORKDIR /app
COPY ./requirements.txt /app/requirements.txt
RUN pip install --no-cache -r requirements.txt
COPY . /app
CMD ["python", "app.py"]
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