Repository navigation
ollama, llama-cpp, vllm: add per-hardware compose overrides #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Intel Arc (Battlemage B580 / Arc Pro B-series, Alchemist A-series) on Linux, | ||
| # x86_64 only. Uses the SYCL (oneAPI) build; IMAGE_VERSION=server-vulkan also | ||
| # works with this file. Needs the xe (or i915) kernel driver. | ||
| # COMPOSE_FILE=docker-compose.yml:docker-compose.arc.yml | ||
| services: | ||
| llama-cpp: | ||
| restart: unless-stopped | ||
| image: ghcr.io/ggml-org/llama.cpp:${IMAGE_VERSION:-server-intel} | ||
| devices: | ||
| - /dev/dri:/dev/dri | ||
| environment: | ||
| LLAMA_ARG_N_GPU_LAYERS: ${LLAMA_ARG_N_GPU_LAYERS:-999} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # NVIDIA Jetson Thor (JetPack 7, arm64, CUDA 13). Use instead of docker-compose.nvidia.yml, | ||
| # not on top of it: Jetson's container toolkit runs in CSV mode, which rejects device | ||
| # reservations (the --gpus equivalent) and only works through the nvidia runtime. | ||
| # COMPOSE_FILE=docker-compose.yml:docker-compose.jetson.yml | ||
| services: | ||
| llama-cpp: | ||
| restart: unless-stopped | ||
| image: ghcr.io/ggml-org/llama.cpp:${IMAGE_VERSION:-server-cuda13} | ||
| runtime: nvidia | ||
| environment: | ||
| NVIDIA_VISIBLE_DEVICES: ${NVIDIA_VISIBLE_DEVICES:-all} | ||
| LLAMA_ARG_N_GPU_LAYERS: ${LLAMA_ARG_N_GPU_LAYERS:-999} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # NVIDIA discrete GPUs on Linux (x86_64 or arm64), CUDA 12.8 (driver >= 570). | ||
| # For driver >= 580 you can set IMAGE_VERSION=server-cuda13 instead. | ||
| # DGX Spark: also add docker-compose.spark.yml. Jetson Thor: use docker-compose.jetson.yml. | ||
| # COMPOSE_FILE=docker-compose.yml:docker-compose.nvidia.yml | ||
| services: | ||
| llama-cpp: | ||
| restart: unless-stopped | ||
| image: ghcr.io/ggml-org/llama.cpp:${IMAGE_VERSION:-server-cuda} | ||
| environment: | ||
| LLAMA_ARG_N_GPU_LAYERS: ${LLAMA_ARG_N_GPU_LAYERS:-999} | ||
| deploy: | ||
| resources: | ||
| reservations: | ||
| devices: | ||
| - driver: nvidia | ||
| count: ${GPU_COUNT:-all} | ||
| capabilities: [gpu] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # NVIDIA DGX Spark (GB10, arm64, sm_121): the CUDA 13 build. Layer on nvidia.yml: | ||
| # COMPOSE_FILE=docker-compose.yml:docker-compose.nvidia.yml:docker-compose.spark.yml | ||
| services: | ||
| llama-cpp: | ||
| restart: unless-stopped | ||
| image: ghcr.io/ggml-org/llama.cpp:${IMAGE_VERSION:-server-cuda13} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # AMD Strix Halo (Ryzen AI Max, gfx1151) and Strix Point (Ryzen AI 300, gfx1150) | ||
| # on Linux, x86_64 only. Uses the Vulkan (RADV) build, which is the fastest and | ||
| # least fussy llama.cpp backend on these APUs; the host only needs the amdgpu | ||
| # kernel driver. IMAGE_VERSION=server-rocm also works with this file. | ||
| # COMPOSE_FILE=docker-compose.yml:docker-compose.strix.yml | ||
| services: | ||
| llama-cpp: | ||
| restart: unless-stopped | ||
| image: ghcr.io/ggml-org/llama.cpp:${IMAGE_VERSION:-server-vulkan} | ||
| devices: | ||
| - /dev/kfd:/dev/kfd | ||
| - /dev/dri:/dev/dri | ||
| group_add: | ||
| - video | ||
| environment: | ||
| LLAMA_ARG_N_GPU_LAYERS: ${LLAMA_ARG_N_GPU_LAYERS:-999} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,46 @@ | ||
| IMAGE_VERSION=latest | ||
| # ==== hardware: pick exactly one COMPOSE_FILE line =========================== | ||
| # See README "Choosing compose files". Add :docker-compose.nfs.yml to the end of | ||
| # any line to keep models on NFS. | ||
|
|
||
| # NVIDIA discrete GPUs and DGX Spark (GB10) | ||
| COMPOSE_FILE=docker-compose.yml:docker-compose.nvidia.yml | ||
| # NVIDIA Jetson Thor (uses the nvidia runtime instead of GPU reservations) | ||
| # COMPOSE_FILE=docker-compose.yml:docker-compose.jetson.yml | ||
| # AMD Strix Halo / Strix Point (ROCm), x86_64 only | ||
| # COMPOSE_FILE=docker-compose.yml:docker-compose.strix.yml | ||
| # Intel Arc (Vulkan), x86_64 only | ||
| # COMPOSE_FILE=docker-compose.yml:docker-compose.arc.yml | ||
| # CPU only | ||
| # COMPOSE_FILE=docker-compose.yml | ||
|
|
||
| # Ollama release (e.g. 0.40.11), or leave unset for latest. The Strix file adds | ||
| # the -rocm suffix itself, so don't include it here. | ||
| # IMAGE_VERSION= | ||
|
|
||
| # ==== NVIDIA (docker-compose.nvidia.yml, docker-compose.jetson.yml) =========== | ||
| # GPUs reserved for the container: all, or a number (ignored on Jetson) | ||
| GPU_COUNT=4 | ||
| # CUDA_VISIBLE_DEVICES= # GPU UUIDs or indexes, comma separated | ||
|
|
||
| # ==== AMD Strix (docker-compose.strix.yml) ==================================== | ||
| # Strix Halo (gfx1151) and Strix Point (gfx1150) are supported by the ROCm | ||
| # build. Only set this if Ollama falls back to the CPU on your APU: | ||
| # HSA_OVERRIDE_GFX_VERSION=11.5.1 # 11.5.0 for Strix Point | ||
| # ROCR_VISIBLE_DEVICES=0 | ||
|
|
||
| # ==== Intel Arc (docker-compose.arc.yml) ====================================== | ||
| # Vulkan is on by default in that file; pick one card on a multi-GPU host: | ||
| # GGML_VK_VISIBLE_DEVICES=0 | ||
|
|
||
| # ==== Ollama (all backends) =================================================== | ||
| # OLLAMA_KEEP_ALIVE=5m | ||
| # OLLAMA_CONTEXT_LENGTH=4096 | ||
| # OLLAMA_NUM_PARALLEL=1 | ||
| # OLLAMA_MAX_LOADED_MODELS=1 | ||
| # OLLAMA_FLASH_ATTENTION=1 | ||
| # OLLAMA_KV_CACHE_TYPE=q8_0 | ||
|
|
||
| # --- Optional: models on NFS --- | ||
| # COMPOSE_FILE=docker-compose.yml:docker-compose.nfs.yml | ||
| # --- Optional: models on NFS (append :docker-compose.nfs.yml to COMPOSE_FILE) --- | ||
| # OLLAMA_NFS_HOST= | ||
| # OLLAMA_NFS_PATH= | ||
| # NFS_MOUNT_OPTS=nfsvers=4,hard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Intel Arc (Battlemage B580 / Arc Pro B-series, Alchemist A-series) on Linux, | ||
| # x86_64 only. Ollama has no oneAPI/SYCL backend; the stock image drives Arc | ||
| # through its bundled Vulkan backend. Needs the xe (or i915) kernel driver. | ||
| # COMPOSE_FILE=docker-compose.yml:docker-compose.arc.yml | ||
| services: | ||
| ollama: | ||
| restart: unless-stopped | ||
| devices: | ||
| - /dev/dri:/dev/dri | ||
| environment: | ||
| OLLAMA_VULKAN: ${OLLAMA_VULKAN:-1} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # NVIDIA Jetson Thor (JetPack 7). Use instead of docker-compose.nvidia.yml, not on top of it: | ||
| # Jetson's container toolkit runs in CSV mode, which rejects device reservations | ||
| # (the --gpus equivalent) and only works through the nvidia runtime. | ||
| # COMPOSE_FILE=docker-compose.yml:docker-compose.jetson.yml | ||
| services: | ||
| ollama: | ||
| restart: unless-stopped | ||
| runtime: nvidia | ||
| environment: | ||
| NVIDIA_VISIBLE_DEVICES: ${NVIDIA_VISIBLE_DEVICES:-all} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # NVIDIA GPUs on Linux (x86_64 or arm64: discrete cards, DGX Spark GB10). | ||
| # Not for Jetson Thor; use docker-compose.jetson.yml there. | ||
| # Needs the NVIDIA Container Toolkit on the host and driver >= 550. | ||
| # COMPOSE_FILE=docker-compose.yml:docker-compose.nvidia.yml | ||
| services: | ||
| ollama: | ||
| restart: unless-stopped | ||
| deploy: | ||
| resources: | ||
| reservations: | ||
| devices: | ||
| - driver: nvidia | ||
| count: ${GPU_COUNT:-all} | ||
| capabilities: [gpu] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # AMD Strix Halo (Ryzen AI Max, gfx1151) and Strix Point (Ryzen AI 300, gfx1150) | ||
| # on Linux, x86_64 only. Uses the ROCm image; the host only needs the amdgpu | ||
| # kernel driver. IMAGE_VERSION, if set, is the bare Ollama version (e.g. 0.40.11); | ||
| # the -rocm suffix is added here. | ||
| # COMPOSE_FILE=docker-compose.yml:docker-compose.strix.yml | ||
| services: | ||
| ollama: | ||
| restart: unless-stopped | ||
| image: ollama/ollama:${IMAGE_VERSION:+${IMAGE_VERSION}-}rocm | ||
| devices: | ||
| - /dev/kfd:/dev/kfd | ||
| - /dev/dri:/dev/dri | ||
| group_add: | ||
| - video |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Install path drops GPU overrides
High Severity
start_appinvokesdocker compose -f docker-compose.yml, which ignoresCOMPOSE_FILEfrom.env. GPU reservations now live only in the hardware overrides, soinstall-ai-satellite.shandinstall-chaos.shstart ollama on CPU even when.envselectsdocker-compose.nvidia.yml.start_experimentalready omits-fso those overrides are honored.Additional Locations (1)
apps/vllm/docker-compose.yml#L7-L29Reviewed by Cursor Bugbot for commit e318533. Configure here.