-
Notifications
You must be signed in to change notification settings - Fork 915
Expand file tree
/
Copy pathdocker-compose.cuda.yaml
More file actions
52 lines (50 loc) · 1.5 KB
/
docker-compose.cuda.yaml
File metadata and controls
52 lines (50 loc) · 1.5 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
x-proxy-env: &proxy-env
HTTP_PROXY: ${HTTP_PROXY}
HTTPS_PROXY: ${HTTPS_PROXY}
NO_PROXY: ${NO_PROXY}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
no_proxy: ${no_proxy}
x-proxies: &proxies
args: *proxy-env
services:
anomalib-studio:
image: anomalib-studio-${AI_DEVICE:-cpu}:${TAG:-latest}
environment:
DEBUG: ${DEBUG:-false}
HOST: ${HOST:-0.0.0.0}
<<: *proxy-env
restart: unless-stopped
build:
# Use root directory as context to build the image
context: ../../
dockerfile: application/docker/Dockerfile
target: anomalib-studio-cuda
<<: *proxies
working_dir: /app/application/backend
container_name: anomalib-studio-${AI_DEVICE:-cpu}
volumes:
# Persist database and uploaded data
- ../backend/data:/app/data
# Persist logs
- ../backend/logs:/app/logs
ports:
# nosemgrep: trailofbits.yaml.docker-compose.port-all-interfaces.port-all-interfaces # to be replaced
- "${HOST_PORT:-8000}:8000"
# Increase file descriptor limits. Needed for uv bytecode compilation
ulimits:
nofile:
soft: 65536
hard: 65536
# Uncomment the following lines to enable GPU support (NVIDIA GPUs only)
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
# Map all host devices to provide access to webcams and other attached devices
privileged: true
devices:
- /dev:/dev