version: "3.9" services: api: image: localai/localai:latest-cpu # For a specific version: # image: localai/localai:v2.12.4-cpu healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/readyz"] interval: 1m timeout: 20m retries: 5 ports: - 31245:8080 environment: - DEBUG=true - REBUILD=true - GALLERIES=[{"name":"model-gallery", "url":"github:go-skynet/model-gallery/index.yaml"}, {"name":"huggingface", "url":"github:go-skynet/model-gallery/huggingface.yaml"}] # - PRELOAD_MODELS='[{"url": "https://raw.githubusercontent.com/go-skynet/model-gallery/main/gpt4all-j.yaml","name": "gpt4all-j"}]' local-ai # ... volumes: - ./models:/build/models:cached # decomment the following piece if running with Nvidia GPUs # deploy: # resources: # reservations: # devices: # - driver: nvidia # count: 1 # capabilities: [gpu]