Repository navigation
Conversation
The runtime stage copied only /opt/venv, whose python symlinks point at the interpreter uv downloaded under /root/.local/share/uv/python. They were left dangling, so python3 fell back to the system 3.10 without the venv packages. Pin Python 3.12 (the CI default), install it under /opt/python and copy it next to the venv. The apt python3 package is no longer needed. Closes #1028
Every llama-cpp-python shared library links against the OpenMP runtime. The builder gets it through build-essential, the runtime base image does not, so import llama_cpp failed with 'libgomp.so.1: cannot open shared object file'. Closes #1042
Without CMAKE_CUDA_ARCHITECTURES llama.cpp compiles only for the build host's GPU, so the image did not run on any other card. Target T4, A100, A10/RTX 30xx and L4/RTX 40xx, plus PTX for sm_89 so newer cards can JIT. Closes #1044
When llama_cpp is imported first, torch skips its NCCL preload and import torch fails with 'undefined symbol: ncclCommShrink'. llama_utils imported llama_cpp at module level, so the GGUF models always hit the bad order. Import llama_cpp lazily in llama_utils, add a test that checks the order in a fresh interpreter, and preload libnccl in the CUDA image so it stays correct regardless of future import changes. Closes #1043
The Huey consumer starts alongside the app and pre-warms its worker, which cleared the loaded_model table. On a fresh database this ran before the app's migrations created it, logging "no such table: loaded_model". The app already clears the table right after migrating, so only clear it when replacing a dead worker.
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Dockerfile.cudahas produced an unusable image since the migration to uv (effdacc6d). The four defects are chained, each one masking the next, and no CI workflow builds the Dockerfiles, so none of them surfaced. One commit per issue:/opt/venvbut not the uv-managed interpreter its symlinks point at, sopython3fell back to the system 3.10. Python is now pinned to 3.12 (the CI default), installed under/opt/pythonand copied next to the venv. The aptpython3package is no longer needed.libgomp1in the runtime stage, required by every llama-cpp-python shared library.CMAKE_CUDA_ARCHITECTURESso llama.cpp kernels are built for T4, A100, A10/RTX 30xx and L4/RTX 40xx, plus PTX for sm_89, instead of only the build host's GPU.llama_utilsnow importsllama_cpplazily, so the GGUF models no longer load it before torch. A new test checks the import order in a fresh interpreter (it fails ondevelop). The image also preloadslibncclso it stays correct regardless of future import changes.Also found while testing the image: on a fresh database the Huey consumer pre-warmed its worker and cleared the
loaded_modeltable before the app's migrations had created it, loggingno such table: loaded_modelon every first start. The cleanup now runs only when replacing a dead worker; the app already clears the table right after migrating. Reproduced ondevelopwith a fresh--local-pathand gone with the fix.Verification
Built and run on an RTX 3070 (sm_86), driver 620.73.04:
/opt/venv/bin/python3, Python 3.12.13llama_cpp/liblibraries resolvelibgomp.so.1import llama_cpp; import torchOK,cuda.is_available()Truelibggml-cuda.soELF sm_75/80/86/89, PTX sm_89/app/and/api/v1/dataset/return 200The
ncclCommShrinkerror from #1043 did not reproduce on this GPU/driver even without the fix, so this run shows the fix is harmless here, not that it is required. The issue reporter verified it on an L4.Locally:
tests/back/modelspasses, except the two BART tests, which fail the same way ondevelop(pytensor/clang compile error on macOS).Closes #1028
Closes #1042
Closes #1043
Closes #1044