-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (84 loc) · 2.06 KB
/
docker-compose.yml
File metadata and controls
87 lines (84 loc) · 2.06 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
version: '3.8'
services:
# CPU-only service
kolibrie-cpu:
build:
context: .
dockerfile: Dockerfile
args:
GPU_VENDOR: none
BASE_TAG: "22.04"
ENABLE_WEB_UI: "true"
image: kolibrie:cpu
ports:
- "8080:8080"
volumes:
- ./data:/app/data
- ./models:/app/ml/examples/models
- ./web:/app/web
environment:
- RUST_LOG=info
- PYTHONPATH=/app/ml/src:/app/python/target/release
command: /app/target/release/kolibrie-http-server
profiles:
- cpu
- default
# GPU-enabled service
kolibrie-gpu:
build:
context: .
dockerfile: Dockerfile
args:
GPU_VENDOR: nvidia
CUDA_VERSION: "11.8"
BASE_TAG: "22.04"
BASE_IMAGE: nvidia/cuda:11.8-devel-ubuntu22.04
ENABLE_WEB_UI: "true"
image: kolibrie:gpu
ports:
- "8080:8080"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
volumes:
- ./data:/app/data
- ./models:/app/ml/examples/models
- ./web:/app/web
environment:
- CUDA_VISIBLE_DEVICES=all
- RUST_LOG=info
- PYTHONPATH=/app/ml/src:/app/python/target/release
command: /app/target/release/kolibrie-http-server
profiles:
- gpu
- nvidia
# Development service
kolibrie-dev:
build:
context: .
dockerfile: Dockerfile
args:
GPU_VENDOR: ${GPU_VENDOR:-none}
CUDA_VERSION: ${CUDA_VERSION:-11.8}
BASE_TAG: ${BASE_TAG:-22.04}
BASE_IMAGE: ${BASE_IMAGE:-ubuntu:22.04}
ENABLE_WEB_UI: "false"
image: kolibrie:dev
ports:
- "8080:8080"
volumes:
- .:/app
- ./data:/app/data
- ./models:/app/ml/examples/models
- ./web:/app/web
working_dir: /app
environment:
- RUST_LOG=debug
- PYTHONPATH=/app/ml/src:/app/python/target/release
command: bash
profiles:
- dev