-
Notifications
You must be signed in to change notification settings - Fork 915
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (46 loc) · 1.54 KB
/
docker-compose.yml
File metadata and controls
48 lines (46 loc) · 1.54 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
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}
# Persist Intel SYCL kernel cache under the existing data volume so
# first-run XPU kernel compilation cost is paid only once.
SYCL_CACHE_PERSISTENT: ${SYCL_CACHE_PERSISTENT:-1}
SYCL_CACHE_DIR: ${SYCL_CACHE_DIR:-/app/data/.sycl-cache}
<<: *proxy-env
restart: unless-stopped
build:
# Use root directory as context to build the image
context: ../../
dockerfile: application/docker/Dockerfile
target: anomalib-studio-${AI_DEVICE:-cpu}
<<: *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
# Map all host devices to provide access to webcams and other attached devices
privileged: true
devices:
- /dev:/dev