-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (84 loc) · 2.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
88 lines (84 loc) · 2.2 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
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
services:
prepare_dataset:
profiles: ["prepare"]
build:
context: .
dockerfile: Dockerfile
image: mlops-challenge-ml:local
platform: linux/amd64
working_dir: /workspace
volumes:
- ./:/workspace
- tfds_cache:/tfds
environment:
TFDS_DATA_DIR: /tfds
WRAPT_DISABLE_EXTENSIONS: "1"
PYTHONUNBUFFERED: "1"
command: >
bash -lc "python -m ml.prepare_dataset
--output_dir ${OUTPUT_DIR:-data/processed}
--dataset_name ${DATASET_NAME:-para_crawl/enpt}
--max_tokens ${MAX_TOKENS:-64}
--train_records ${TRAIN_RECORDS:-20000}
--val_records ${VAL_RECORDS:-2000}
--seed ${SEED:-42}"
train:
profiles: ["train"]
build:
context: .
dockerfile: Dockerfile
image: mlops-challenge-ml:local
platform: linux/amd64
working_dir: /workspace
volumes:
- ./:/workspace
- tfds_cache:/tfds
environment:
TFDS_DATA_DIR: /tfds
WRAPT_DISABLE_EXTENSIONS: "1"
PYTHONUNBUFFERED: "1"
command: >
bash -lc "python -m ml.train
--data_dir ${OUTPUT_DIR:-data/processed}
--artifacts_dir ${ARTIFACTS_DIR:-artifacts}
--epochs ${EPOCHS:-10}
--batch_size ${BATCH_SIZE:-32}
--threshold ${THRESHOLD:-0.30}
--max_tokens ${MAX_TOKENS:-64}
--git_sha ${GIT_SHA:-unknown}"
api:
profiles: ["api"]
build:
context: .
dockerfile: Dockerfile
image: mlops-challenge-ml:local
platform: linux/amd64
working_dir: /workspace
volumes:
- ./:/workspace
environment:
WRAPT_DISABLE_EXTENSIONS: "1"
PYTHONUNBUFFERED: "1"
ARTIFACTS_DIR: /workspace/${ARTIFACTS_DIR:-artifacts}
DEFAULT_RUN_ID: ${DEFAULT_RUN_ID:-}
ports:
- "${API_PORT:-8000}:8000"
command: >
bash -lc "uvicorn inference_api.main:app --host 0.0.0.0 --port 8000"
tests:
profiles: ["tests"]
build:
context: .
dockerfile: Dockerfile
image: mlops-challenge-ml:local
platform: linux/amd64
working_dir: /workspace
volumes:
- ./:/workspace
environment:
WRAPT_DISABLE_EXTENSIONS: "1"
PYTHONUNBUFFERED: "1"
command: >
bash -lc "pytest -q"
volumes:
tfds_cache: