version: '3.8' services: funasr: build: . container_name: funasr-websocket volumes: - .:/app # 如果需要使用本地模型缓存 - ~/.cache/modelscope:/root/.cache/modelscope ports: - "10095:10095" environment: - PYTHONUNBUFFERED=1 deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: [gpu] restart: unless-stopped command: python src/server.py --device cuda --ngpu 1