2026-07-20 14:59:31 +08:00
|
|
|
services:
|
|
|
|
|
compute-api:
|
2026-07-21 09:23:43 +08:00
|
|
|
image: ${COMPUTE_API_IMAGE:-yg-ft-compute-api:latest}
|
2026-07-20 14:59:31 +08:00
|
|
|
container_name: yg-ft-compute-api
|
|
|
|
|
gpus: all
|
|
|
|
|
ports:
|
2026-07-21 09:23:43 +08:00
|
|
|
- "${COMPUTE_API_PORT:-19100}:9100"
|
2026-07-20 14:59:31 +08:00
|
|
|
environment:
|
|
|
|
|
COMPUTE_ENV: ${COMPUTE_ENV:-prod}
|
|
|
|
|
COMPUTE_HOST_ID: ${COMPUTE_HOST_ID:-gpu-node-01}
|
|
|
|
|
COMPUTE_SERVICE_TOKEN: ${COMPUTE_SERVICE_TOKEN:-change_me}
|
|
|
|
|
ENABLE_APP_CALLBACK: ${ENABLE_APP_CALLBACK:-false}
|
2026-07-21 09:23:43 +08:00
|
|
|
LLAMA_FACTORY_HOME: ${LLAMA_FACTORY_HOME:-/app/LLaMA-Factory}
|
2026-07-20 14:59:31 +08:00
|
|
|
YG_FT_DATA_ROOT: ${YG_FT_DATA_ROOT:-/data/yg-ft}
|
|
|
|
|
LOG_DIR: ${LOG_DIR:-/opt/yg-ft/logs/compute}
|
|
|
|
|
CUDA_VISIBLE_DEVICES: ${CUDA_VISIBLE_DEVICES:-all}
|
|
|
|
|
NVIDIA_VISIBLE_DEVICES: ${NVIDIA_VISIBLE_DEVICES:-all}
|
|
|
|
|
NVIDIA_DRIVER_CAPABILITIES: ${NVIDIA_DRIVER_CAPABILITIES:-compute,utility}
|
|
|
|
|
PYTHONPATH: /app
|
|
|
|
|
volumes:
|
|
|
|
|
- ../../compute:/app/compute:ro
|
|
|
|
|
- ${YG_FT_DATA_ROOT_HOST:-/data/yg-ft}:${YG_FT_DATA_ROOT:-/data/yg-ft}
|
|
|
|
|
- ../../runtime/compute/logs:/opt/yg-ft/logs/compute
|
|
|
|
|
- ../../runtime/compute/training-logs:/opt/yg-ft/logs/training
|
|
|
|
|
networks:
|
|
|
|
|
- yg-ft-compute
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:9100/health', timeout=3).read()\""]
|
|
|
|
|
interval: 30s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 3
|
|
|
|
|
start_period: 20s
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
yg-ft-compute:
|
|
|
|
|
name: yg-ft-compute
|