-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
64 lines (53 loc) · 1.69 KB
/
Copy pathTaskfile.yml
File metadata and controls
64 lines (53 loc) · 1.69 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: '3'
# https://taskfile.dev/usage/#env-files
dotenv: [ '.env.local', '.env' ]
vars:
# https://taskfile.dev/reference/templating/
BASE_URL: '{{.TASK_BASE_URL | default .COMPOSE_SERVER_DOMAIN | default .COMPOSE_DOMAIN }}'
DOCKER_COMPOSE: '{{ .TASK_DOCKER_COMPOSE | default "itkdev-docker-compose" }}'
IMAGE_NAME: 'ghcr.io/aarhusai/piper-tts'
VERSION: '0.1.0'
tasks:
default:
desc: 'List all tasks'
cmds:
- task --list-all
silent: true
open:
desc: "Open-webui in the browser"
cmds:
- open http://{{ .BASE_URL }}
silent: true
copy:config:
desc: "Copy config file from example, if it does not exist"
cmds:
- cp .env.example .env || true
silent: true
build:
desc: "Build container with newest requirements"
cmds:
- task compose -- build --pull
silent: true
####
## Production build
####
prod:build:
desc: Build and push docker images
cmds:
- task: prod:build:cpu
- task: prod:build:gpu
silent: true
prod:build:cpu:
desc: Build and push docker images (CPU)
cmds:
- docker buildx build --tag ghcr.io/aarhusai/piper-tts:{{ .VERSION }}-cpu --tag ghcr.io/aarhusai/piper-tts:cpu --no-cache --pull --file Dockerfile .
- docker push {{ .IMAGE_NAME }}:{{ .VERSION }}-cpu
- docker push {{ .IMAGE_NAME }}:cpu
silent: true
prod:build:gpu:
desc: Build and push docker images (GPU)
cmds:
- docker buildx build --tag ghcr.io/aarhusai/piper-tts:{{ .VERSION }}-gpu --tag ghcr.io/aarhusai/piper-tts:gpu --no-cache --pull --file Dockerfile.gpu .
- docker push {{ .IMAGE_NAME }}:{{ .VERSION }}-gpu
- docker push {{ .IMAGE_NAME }}:gpu
silent: true