Skip to content

Commit 786b9fd

Browse files
committed
Uninstall numba-cuda on CPU image to fix tsfresh import
Instead of just skipping tsfresh tests on CPU, uninstall numba-cuda from the Colab base image on CPU builds. This lets tsfresh/stumpy work correctly on CPU without CUDA dependencies. On GPU, numba-cuda is upgraded to v0.30.0 for NumPy 2.4 support.
1 parent 6d4b24e commit 786b9fd

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Dockerfile.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ ARG PACKAGE_PATH=/usr/local/lib/python3.12/dist-packages
4343
# b/493600019: numba-cuda v0.30.0 fixes np.trapz removal in NumPy 2.4 but requires libcudart.so (GPU only).
4444
RUN uv pip install --system --force-reinstall --no-cache numba-cuda
4545
RUN uv pip install --system --no-cache "pycuda"
46+
{{ else }}
47+
# b/493600019: On CPU, remove numba-cuda shipped by the Colab base image. Newer numba-cuda
48+
# depends on cuda-bindings which crashes at import without libcudart.so. Packages like
49+
# tsfresh/stumpy that import numba.cuda will fall back gracefully without it.
50+
RUN uv pip uninstall --system numba-cuda 2>/dev/null || true
4651
{{ end }}
4752

4853

0 commit comments

Comments
 (0)