services: litellm: image: docker.litellm.ai/berriai/litellm:main-stable container_name: litellm restart: unless-stopped ports: - "4000:4000" extra_hosts: - "host.docker.internal:host-gateway" environment: LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY:-sk-litellm-bocheng-207} LITELLM_LOG: INFO # 容器内解析 host 上的 Xinference NO_DOCS: "False" volumes: - ./config.yaml:/app/config.yaml:ro command: - "--config" - "/app/config.yaml" - "--port" - "4000" - "--host" - "0.0.0.0" healthcheck: test: [ "CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:4000/health/liveliness', timeout=5)\" || exit 1", ] interval: 20s timeout: 10s retries: 10 start_period: 40s