-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.sh
25 lines (22 loc) · 912 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#docker
set -e
DATE=$(date -u +"%Y%m%dT%H%MZ")
docker build -t registry.gitlab.com/alexchadwick/bark-rvc-api:$DATE .
docker tag registry.gitlab.com/alexchadwick/bark-rvc-api:$DATE registry.gitlab.com/alexchadwick/bark-rvc-api:latest
docker push registry.gitlab.com/alexchadwick/bark-rvc-api:$DATE
docker run \
--name api \
--rm \
--runtime=nvidia \
--gpus all \
-p 8000:8000 \
-e NVIDIA_VISIBLE_DEVICES=0 \
-v ./config.toml:/opt/config.toml \
-v /mnt/fstore/models/voice:/models \
-v ~/Downloads:/tmp/ \
-v ~/.cache/suno:/root/.cache/suno/ \
-v ~/.cache/huggingface/:/root/.cache/huggingface/ \
-v ~/.cache/torch:/root/.cache/torch \
registry.gitlab.com/alexchadwick/bark-rvc-api:$DATE
# docker push registry.gitlab.com/alexchadwick/bark-rvc-api:latest