-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
44 lines (41 loc) · 1.11 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
version: 3
vars:
VENV: "venv"
VENV_PYTHON: "{{.VENV}}/bin/python"
VENV_PIP: "{{.VENV}}/bin/pip"
DOCKER_IMAGE_NAME: "codexglue-codesearch"
DOCKER_CONTAINER_NAME: "codexglue-codesearch"
includes:
data:
dir: "data"
taskfile: "data"
optional: true
code:
taskfile: "code"
optional: true
tasks:
venv:create:
run: once
cmds:
- "python -m venv {{.VENV}}"
- task: venv:install
status: ["test -d {{.VENV}}"]
venv:install: "{{.VENV_PIP}} install -r requirements.txt"
venv:clean: "rm -r {{.VENV}}"
# Project cleanup
clean:
deps:
- task: "code:clean"
- task: "data:clean"
clean-all:
deps:
- task: "clean"
- task: "data:clean:download-model"
# Docker
docker:build: ["docker compose build"]
docker:up: ["docker compose up -d"]
docker:exec: ["docker compose exec workspace {{.CLI_ARGS}}"]
docker:exec-gpu: ["docker compose -f docker-compose-gpu.yml exec workspace {{.CLI_ARGS}}"]
docker:extract: ["docker compose cp workspace:/project/{{.CLI_ARGS}} ."]
docker:stop: ["docker compose stop"]
docker:down: ["docker compose down"]