services: # ========================================================================== # CPU СЕРВИСЫ (Стандартный запуск без GPU / Standalone) # ========================================================================== test: build: context: . dockerfile: Dockerfile image: flyguard:latest container_name: flyguard-test command: ["test"] volumes: - ./artifacts:/app/artifacts - ./data:/data:ro environment: - PYTHONUNBUFFERED=1 - FLYGUARD_DATA=/data shm_size: '2gb' evaluate: image: flyguard:latest container_name: flyguard-evaluate command: ["evaluate", "--mbon-dir", "artifacts/mbon_folds"] volumes: - ./artifacts:/app/artifacts - ./data:/data:ro environment: - PYTHONUNBUFFERED=1 - FLYGUARD_DATA=/data shm_size: '2gb' benchmark: image: flyguard:latest container_name: flyguard-benchmark command: [ "benchmark", "--memory", "artifacts/mushroom_body.npz", "--mbon-dir", "artifacts/mbon_folds", "--augment", "--out", "artifacts/benchmark.json" ] volumes: - ./artifacts:/app/artifacts - ./data:/data:ro environment: - PYTHONUNBUFFERED=1 - FLYGUARD_DATA=/data shm_size: '2gb' pipeline: image: flyguard:latest container_name: flyguard-pipeline command: ["pipeline", "--all", "--memory", "artifacts/mushroom_body.npz"] volumes: - ./artifacts:/app/artifacts - ./data:/data:ro environment: - PYTHONUNBUFFERED=1 - FLYGUARD_DATA=/data shm_size: '2gb' shell: image: flyguard:latest container_name: flyguard-shell command: ["bash"] volumes: - ./artifacts:/app/artifacts - ./data:/data:ro environment: - PYTHONUNBUFFERED=1 - FLYGUARD_DATA=/data stdin_open: true tty: true shm_size: '2gb' # ========================================================================== # NVIDIA GPU СЕРВИСЫ (NVIDIA GeForce RTX 4070 Ti Super 16GB / CUDA 12.x) # Использование: docker compose run --rm <имя-сервиса> # ========================================================================== gpu-test: build: context: . dockerfile: Dockerfile.gpu image: flyguard:gpu container_name: flyguard-gpu-test command: ["test"] volumes: - ./artifacts:/app/artifacts - ./data:/data:ro environment: - PYTHONUNBUFFERED=1 - FLYGUARD_DATA=/data - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=compute,utility deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] shm_size: '8gb' gpu-benchmark: image: flyguard:gpu container_name: flyguard-gpu-benchmark command: [ "benchmark", "--memory", "artifacts/mushroom_body.npz", "--mbon-dir", "artifacts/mbon_folds", "--augment", "--device", "cuda", "--out", "artifacts/benchmark_gpu.json" ] volumes: - ./artifacts:/app/artifacts - ./data:/data:ro environment: - PYTHONUNBUFFERED=1 - FLYGUARD_DATA=/data - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=compute,utility deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] shm_size: '8gb' gpu-evaluate: image: flyguard:gpu container_name: flyguard-gpu-evaluate command: ["evaluate", "--mbon-dir", "artifacts/mbon_folds", "--device", "cuda"] volumes: - ./artifacts:/app/artifacts - ./data:/data:ro environment: - PYTHONUNBUFFERED=1 - FLYGUARD_DATA=/data - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=compute,utility deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] shm_size: '8gb' train-mbon-gpu: image: flyguard:gpu container_name: flyguard-train-mbon-gpu command: [ "train-mbon", "--device", "cuda", "--n-kc", "50000", "--active", "100", "--epochs", "100", "--save-folds", "artifacts/mbon_folds_50k", "--out", "artifacts/mbon_readout_50k.npz" ] volumes: - ./artifacts:/app/artifacts - ./data:/data environment: - PYTHONUNBUFFERED=1 - FLYGUARD_DATA=/data - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=compute,utility deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] shm_size: '8gb' train-track-gpu: image: flyguard:gpu container_name: flyguard-train-track-gpu command: [ "train-track", "--device", "cuda", "--epochs", "300", "--baseline", "--save-folds", "artifacts/track_folds", "--out", "artifacts/track_readout.npz" ] volumes: - ./artifacts:/app/artifacts - ./data:/data environment: - PYTHONUNBUFFERED=1 - FLYGUARD_DATA=/data - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=compute,utility deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] shm_size: '8gb' gpu-pipeline: image: flyguard:gpu container_name: flyguard-gpu-pipeline command: [ "pipeline", "--all", "--memory", "artifacts/mushroom_body.npz", "--readout", "artifacts/mbon_readout.npz", "--device", "cuda", "--verbose" ] volumes: - ./artifacts:/app/artifacts - ./data:/data:ro environment: - PYTHONUNBUFFERED=1 - FLYGUARD_DATA=/data - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=compute,utility deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] shm_size: '8gb' gpu-shell: image: flyguard:gpu container_name: flyguard-gpu-shell command: ["bash"] volumes: - ./artifacts:/app/artifacts - ./data:/data environment: - PYTHONUNBUFFERED=1 - FLYGUARD_DATA=/data - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=compute,utility deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] stdin_open: true tty: true shm_size: '8gb'