-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
89 lines (79 loc) · 2.15 KB
/
Taskfile.yml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
version: "3"
output: prefixed
vars:
APP_NAME: dalle-ays
VERSION: v0.0.0
APP_ROOT: app
tasks:
setup:
prefix: setup
desc: sets up the development environment
cmds:
- 'python3 -m venv venv'
- echo activate your venv with 'source venv/bin/activate'
sources:
- venv
install-deps:
prefix: install-deps
cmds:
- pip install black isort
- pip install fastapi==0.79.0 uvicorn==0.18.2 pydantic==1.9.0
- pip install "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
- pip install -q git+https://github.com/borisdayma/[email protected]
- pip install -q git+https://github.com/patil-suraj/vqgan-jax@main
- pip install pydantic[dotenv]
build:
prefix: build
desc: builds the docker app
cmds:
- docker build -t {{.APP_NAME}}:{{.VERSION}} .
clean:
prefix: clean
desc: removes the built image
cmds:
- docker rm {{.APP_NAME}} || true
stop:
prefix: stop
desc: stops the running container
cmds:
- docker kill {{.APP_NAME}}
dev:
prefix: dev
desc: runs the app with gpu (use -w flag for live rebuilds)
cmds:
- task: clean
- task: build
- task: run
sources:
- '{{.APP_ROOT}}/**'
- '{{.APP_ROOT}}/*/**'
- Dockerfile
dev-cpu:
prefix: dev
desc: runs the app for cpu only (use -w flag for live rebuilds)
cmds:
- task: clean
- task: build
- task: run-cpu
sources:
- '{{.APP_ROOT}}/**'
- '{{.APP_ROOT}}/*/**'
- Dockerfile
lint:
prefix: lint
desc: lint the application
cmds:
- black {{.APP_ROOT}}/.
deps: [setup]
run:
prefix: run
cmds:
- docker run --rm --name "dalle-ays" -p 8000:8000 --gpus all --env-file .env -v "${PWD}":/{{.APP_ROOT}} {{.APP_NAME}}:{{.VERSION}} --log-level debug
run-cpu:
prefix: run-cpu
cmds:
- docker run --rm --name "dalle-ays" -p 8000:8000 --env-file .env -v "${PWD}":/{{.APP_ROOT}} {{.APP_NAME}}:{{.VERSION}} --log-level debug
env:
prefix: env
cmds:
- echo "WANDB_API_KEY=<click here and replace this with key https://wandb.ai/authorize>"