Self Checks
RAGFlow workspace code commit ID
v0.20.0-60-g1bd64daf full cuda13-cu129
RAGFlow image version
v0.20.0-60-g1bd64daf full
Other environment information
Actual behavior
Issue Summary
The custom Dockerfile.cuda13 had two critical bugs that prevented proper CUDA 13.0 support for RTX 5090:
- Missing Python interpreter files - The uv-installed Python interpreter was not copied to the production stage
- PyTorch version mismatch - PyTorch cu130 nightly was installed in the builder stage but got overwritten by the cu126 version
from uv.lock
Files Modified
/home/jhsmith/ragflow/Dockerfile.cuda13
Change 1: Added Python interpreter copy (Line 186)
Copy Python environment and packages
ENV VIRTUAL_ENV=/ragflow/.venv
COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
+COPY --from=builder /root/.local/share/uv/python /root/.local/share/uv/python
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
Problem: The venv contained symlinks to Python at /root/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/bin/python3.10,
but this directory wasn't copied to the production stage, causing ModuleNotFoundError: No module named 'beartype' at runtime.
Change 2: Moved PyTorch cu130 installation to production stage (Lines 189-192)
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
+# Install PyTorch cu130 nightly in production stage to ensure it's not overwritten
+# This must be done after copying venv to override the cu12 version from uv.lock
+RUN --mount=type=cache,id=ragflow_uv_cuda13_prod,target=/root/.cache/uv,sharing=locked \
ENV PYTHONPATH=/ragflow/
Problem: The builder stage installed PyTorch cu130 nightly at line 157-159, but when the venv was copied to production, the
uv.lock file's pinned torch 2.7.1+cu126 version remained. This version doesn't support Blackwell architecture (sm_120/compute
capability 12.0), causing the RTX 5090 to be unable to compile GPU kernels.
Verification
After fixes:
- PyTorch: 2.10.0.dev20251008+cu130 (was 2.7.1+cu126)
- CUDA: 13.0 (was 12.6)
- Compute capability: 12.0 (Blackwell/sm_120 now supported)
- Successfully runs GPU matrix operations on RTX 5090
Root Cause
The Dockerfile.cuda13 was likely copied from the standard Dockerfile but the PyTorch override strategy didn't account for:
- Multi-stage builds where the uv Python installation directory needs explicit copying
- The uv.lock file pinning torch dependencies that get reinstalled when copying the venv between stages
Suggested Fix for Repository
The standard Dockerfile doesn't have these issues, suggesting Dockerfile.cuda13 was an incomplete adaptation. Consider either:
- Applying these same fixes to Dockerfile.cuda13 in the repository
- Documenting that users need PyTorch cu130+ for Blackwell GPUs
Expected behavior
I expected the code to compile/install without error.
Steps to reproduce
Install with gpu support for Blackwell. Modify .env per instructions.
Additional information
No response
Self Checks
RAGFlow workspace code commit ID
v0.20.0-60-g1bd64daf full cuda13-cu129
RAGFlow image version
v0.20.0-60-g1bd64daf full
Other environment information
Actual behavior
Issue Summary
The custom Dockerfile.cuda13 had two critical bugs that prevented proper CUDA 13.0 support for RTX 5090:
from uv.lock
Files Modified
/home/jhsmith/ragflow/Dockerfile.cuda13
Change 1: Added Python interpreter copy (Line 186)
Copy Python environment and packages
ENV VIRTUAL_ENV=/ragflow/.venv
COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
+COPY --from=builder /root/.local/share/uv/python /root/.local/share/uv/python
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
Problem: The venv contained symlinks to Python at /root/.local/share/uv/python/cpython-3.10.18-linux-x86_64-gnu/bin/python3.10,
but this directory wasn't copied to the production stage, causing ModuleNotFoundError: No module named 'beartype' at runtime.
Change 2: Moved PyTorch cu130 installation to production stage (Lines 189-192)
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
+# Install PyTorch cu130 nightly in production stage to ensure it's not overwritten
+# This must be done after copying venv to override the cu12 version from uv.lock
+RUN --mount=type=cache,id=ragflow_uv_cuda13_prod,target=/root/.cache/uv,sharing=locked \
ENV PYTHONPATH=/ragflow/
Problem: The builder stage installed PyTorch cu130 nightly at line 157-159, but when the venv was copied to production, the
uv.lock file's pinned torch 2.7.1+cu126 version remained. This version doesn't support Blackwell architecture (sm_120/compute
capability 12.0), causing the RTX 5090 to be unable to compile GPU kernels.
Verification
After fixes:
Root Cause
The Dockerfile.cuda13 was likely copied from the standard Dockerfile but the PyTorch override strategy didn't account for:
Suggested Fix for Repository
The standard Dockerfile doesn't have these issues, suggesting Dockerfile.cuda13 was an incomplete adaptation. Consider either:
Expected behavior
I expected the code to compile/install without error.
Steps to reproduce
Additional information
No response