Commit fdfa9b6
fix(llamacpp): make the default CUDA image build (slim toolkit + nvcc on PATH)
build_llama_cpp_image's default CUDA image failed to build on constrained image builders,
for two independent reasons found driving a real GPU serve end to end:
1. Full `cuda-toolkit-12-8` metapackage. It drags in cuda-nsight-systems (a GUI profiler:
Java/GTK/X11, ~2 GB) that a headless build never uses, bloating the image and OOM-killing
resource-constrained builders mid-install. Replace it with the compile-only subset
(cuda-nvcc + cudart/driver stubs + cuBLAS/cuRAND dev, ~2.8 GB).
2. `No CMAKE_CUDA_COMPILER could be found`. The image's PATH env (which includes
$CUDA_HOME/bin, where nvcc lives) is applied *after* the cmake configure/build RUN steps,
so nvcc is not on PATH during the build. Set PATH inline on the cmake configure and build
commands.
With both fixes the default `build_llama_cpp_image()` compiles llama-server and the app serves
an OpenAI-compatible /v1 endpoint on a GPU node (verified on a live control plane).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Michael Hotan <mike@union.ai>1 parent 1b5b01c commit fdfa9b6
2 files changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
| |||
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
130 | | - | |
| 133 | + | |
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
| |||
0 commit comments