30 lines
625 B
YAML
30 lines
625 B
YAML
services:
|
|
ml:
|
|
build:
|
|
context: ../..
|
|
dockerfile: ml/Dockerfile
|
|
ports:
|
|
- "${ML_BIND_ADDRESS:-127.0.0.1}:${ML_HTTP_PORT:-8000}:8000"
|
|
healthcheck:
|
|
test:
|
|
- CMD
|
|
- python
|
|
- -c
|
|
- "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/healthz', timeout=2)"
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 5
|
|
start_period: 15s
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: 10m
|
|
max-file: "3"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "2.0"
|
|
memory: 4G
|
|
|