| services: |
| ai-image-detector: |
| build: |
| context: . |
| dockerfile: Dockerfile |
| image: ai-image-detector:latest |
| container_name: ai-image-detector |
| ports: |
| - "7860:7860" |
| environment: |
| |
| MODEL_DIR: /data/model |
| GRADIO_SERVER_NAME: 0.0.0.0 |
| GRADIO_SERVER_PORT: "7860" |
| |
| MODEL_SKIP_DOWNLOAD: "" |
| |
| HF_TOKEN: ${HF_TOKEN:-} |
| volumes: |
| |
| - model_cache:/data/model |
| restart: unless-stopped |
| healthcheck: |
| test: ["CMD", "python", "-c", "import urllib.request, sys; sys.exit(0 if urllib.request.urlopen('http://localhost:7860/', timeout=5).status == 200 else 1)"] |
| interval: 30s |
| timeout: 10s |
| retries: 3 |
| start_period: 60s |
|
|
| volumes: |
| model_cache: |
|
|