| version: "3.8" |
|
|
| |
| |
|
|
| services: |
| shimokumo: |
| build: |
| context: . |
| dockerfile: Dockerfile |
| container_name: shimokumo-ai |
| restart: unless-stopped |
| ports: |
| - "${SHIMOKUMO_PORT:-8080}:8080" |
| volumes: |
| - ./models:/app/models |
| - ./characters:/app/characters |
| - ./data:/app/data |
| - ./output:/app/output |
| - ./logs:/app/logs |
| - ./config.yaml:/app/config.yaml:ro |
| env_file: |
| - .env |
| environment: |
| - SHIMOKUMO_MODEL_PATH=/app/models/shimokumo |
| - SHIMOKUMO_CHARACTER_FILE=/app/characters/shimokumo.json |
| - SHIMOKUMO_LOG_LEVEL=${SHIMOKUMO_LOG_LEVEL:-INFO} |
| - NVIDIA_VISIBLE_DEVICES=all |
| healthcheck: |
| test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:8080/api/v1/health')"] |
| interval: 30s |
| timeout: 10s |
| retries: 3 |
| start_period: 60s |
| deploy: |
| resources: |
| limits: |
| memory: 32G |
| reservations: |
| memory: 8G |
| profiles: |
| - cpu |
| - gpu |
| command: ["python", "main.py", "--host", "0.0.0.0", "--port", "8080"] |
|
|
| |
| shimokumo-gpu: |
| build: |
| context: . |
| dockerfile: Dockerfile.gpu |
| container_name: shimokumo-ai-gpu |
| restart: unless-stopped |
| ports: |
| - "${SHIMOKUMO_PORT:-8080}:8080" |
| volumes: |
| - ./models:/app/models |
| - ./characters:/app/characters |
| - ./data:/app/data |
| - ./output:/app/output |
| - ./logs:/app/logs |
| - ./config.yaml:/app/config.yaml:ro |
| env_file: |
| - .env |
| environment: |
| - SHIMOKUMO_MODEL_PATH=/app/models/shimokumo |
| - SHIMOKUMO_CHARACTER_FILE=/app/characters/shimokumo.json |
| - SHIMOKUMO_LOG_LEVEL=${SHIMOKUMO_LOG_LEVEL:-INFO} |
| - NVIDIA_VISIBLE_DEVICES=all |
| - NVIDIA_DRIVER_CAPABILITIES=compute,utility |
| healthcheck: |
| test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:8080/api/v1/health')"] |
| interval: 30s |
| timeout: 10s |
| retries: 3 |
| start_period: 120s |
| deploy: |
| resources: |
| reservations: |
| devices: |
| - driver: nvidia |
| count: all |
| capabilities: [gpu] |
| profiles: |
| - gpu |
| command: ["python", "main.py", "--host", "0.0.0.0", "--port", "8080"] |
|
|