-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaskfile.yml
86 lines (73 loc) · 3.2 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
version: '3'
dontenv: ['task.env']
vars:
COMPUTE_TYPE: '{{default "gpu" .COMPUTE_TYPE}}'
tasks:
clean:
cmds:
- docker system prune -f --volumes
triton-start:
#TODO: define all the conda build envs and triton-import pulling in models
#deps: [build-execution-env-all, model-import]
cmds:
- docker compose -f docker-compose.yml --profile {{.COMPUTE_TYPE}} up -d
preconditions:
- test -f ./model-repository/embed_image/embed_image.tar.gz
- test -f ./model-repository/embed_text/embed_text.tar.gz
- test -f ./model-repository/fasttext_language_identification/fasttext_language_identification.tar.gz
- test -f ./model-repository/multilingual_e5_large/multilingual_e5_large.tar.gz
- test -f ./model-repository/seamlessm4t_text2text/seamlessm4t_text2text.tar.gz
- test -f ./model-repository/sentencex/sentencex.tar.gz
- test -f ./model-repository/siglip_text/siglip_text.tar.gz
- test -f ./model-repository/siglip_vision/siglip_vision.tar.gz
triton-stop:
cmds:
- docker compose -f docker-compose.yml --profile {{.COMPUTE_TYPE}} down
triton-infer:
desc: "This task is not yet implemented"
cmds:
- println "Task 'my-task' is not yet implemented."
model-import:
desc: "Task to import model files from upstream model store"
cmds:
- mkdir -p models
- huggingface-cli download facebook/fasttext-language-identification --cache-dir models
- huggingface-cli download facebook/seamless-m4t-v2-large --cache-dir models
- huggingface-cli download google/siglip-so400m-patch14-384 --cache-dir models
- huggingface-cli download intfloat/multilingual-e5-large --cache-dir models
build-execution-env-all:
desc: "Taks to build all execution environments"
deps: [build-embed_image-env, build-embed_text-env, build-fasttext_language_identification-env, build-multilingual_e5_large-env, build-seamlessm4t_text2text-env, build-siglip_text-env, build-siglip_vision-env]
build-*-env:
vars:
MODEL: '{{index .MATCH 0}}'
label: 'build-{{.MODEL}}-env'
cmds:
- task: build-execution-env-internal
vars:
CONDA_ENV_NAME: '{{.MODEL}}'
CONDA_ENV_FILE_PATH: '/model-repository/{{.MODEL}}/environment.yml'
CONDA_PACKED_OUTPUT_FILE_PATH: '/model-repository/{{.MODEL}}/{{.MODEL}}.tar.gz'
preconditions:
- test -d "./model-repository/{{.MODEL}}"
build-execution-env-internal:
internal: true
cmds:
- >
rm -f .{{.CONDA_PACKED_OUTPUT_FILE_PATH}} &&
printf "Building conda pack file {{.CONDA_PACKED_OUTPUT_FILE_PATH}} for {{.CONDA_ENV_NAME}} using {{.CONDA_ENV_FILE_PATH}}\n\n" &&
docker compose -f docker-compose.yml run
--rm
--no-deps
--interactive=false
--env CONDA_ENV_NAME={{.CONDA_ENV_NAME}}
--env CONDA_ENV_FILE_PATH={{.CONDA_ENV_FILE_PATH}}
--env CONDA_PACKED_OUTPUT_FILE_PATH={{.CONDA_PACKED_OUTPUT_FILE_PATH}}
conda-pack-builder
sources:
- '.{{.CONDA_ENV_FILE_PATH}}'
generates:
- '.{{.CONDA_PACKED_OUTPUT_FILE_PATH}}'
build-conda-packer:
cmds:
- docker compose -f docker-compose.yml --profile build build