mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: install cuda-compat stubs for build-time PaddlePaddle import
paddlepaddle-gpu needs libcuda.so.1 at import time, but the real NVIDIA driver is only injected at runtime by the container toolkit. Install cuda-compat-12-6 which provides forward-compat stubs that satisfy the dlopen without a real GPU. Also force CPU mode via env vars in the download script.
This commit is contained in:
@@ -118,6 +118,15 @@ RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
||||
|
||||
RUN /opt/venv/bin/pip install seam-carving==1.1.0
|
||||
|
||||
# Install CUDA forward-compat stubs for build-time model downloads.
|
||||
# paddlepaddle-gpu needs libcuda.so.1 to import, but the real driver is
|
||||
# only injected at runtime by nvidia-container-toolkit. The compat package
|
||||
# provides a stub that satisfies the dlopen without a real GPU.
|
||||
RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
||||
apt-get update && apt-get install -y --no-install-recommends cuda-compat-12-6 && \
|
||||
rm -rf /var/lib/apt/lists/* \
|
||||
; fi
|
||||
|
||||
# Pre-download and verify all ML models
|
||||
COPY docker/download_models.py /tmp/download_models.py
|
||||
RUN /opt/venv/bin/python3 /tmp/download_models.py && rm -f /tmp/download_models.py
|
||||
|
||||
Reference in New Issue
Block a user