Skip to content

fix: upgrade Docker build to CUDA 12.6 and Python 3.11#6

Open
sameeul wants to merge 6 commits into
mainfrom
fix/docker-cuda12-python311
Open

fix: upgrade Docker build to CUDA 12.6 and Python 3.11#6
sameeul wants to merge 6 commits into
mainfrom
fix/docker-cuda12-python311

Conversation

@sameeul

@sameeul sameeul commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

Upgrades the GPU Docker build to CUDA 12.6 and Python 3.11:

  • Dockerfile base image nvidia/cuda:11.5.2-runtime-ubuntu20.04nvidia/cuda:12.6.0-runtime-ubuntu22.04
  • conda_linux_gpu.txt: replace cudatoolkit=11.5 / cudatoolkit-dev=11.5 with the CUDA 12.6 conda-forge packages that actually ship nvcc (cuda-version=12.6, cuda-nvcc=12.6, cuda-cudart-dev=12.6, libcufft-dev)
  • build_conda.sh: add -DCMAKE_CUDA_COMPILER=$CONDA_PREFIX/bin/nvcc so CMake doesn't rely on check_language(CUDA) discovery, and bump PYTHON=3.93.11 (3.9 is EOL)
  • publish_docker.yml: update the hardcoded nyxus-3.9 env path to nyxus-3.11

Root cause (the CUDA fix)

cudatoolkit-dev=11.5.0 installs headers/libs but doesn't place nvcc where CMake's check_language(CUDA) looks, so CMake reported CMAKE_CUDA_COMPILER=NOTFOUND and hit the fatal error in CMakeLists.txt. The CUDA 12.6 conda-forge packages ship nvcc, and passing -DCMAKE_CUDA_COMPILER explicitly makes discovery deterministic.

Rebased onto the z5 3.0.1 upgrade

This branch previously carried two extra commits that worked around the old z5 2.0.20 + xtensor stack in the Docker build:

  • "check for z5/multiarray/xtensor_access.hxx instead of z5/z5.hxx"
  • "install z5 2.0.20 C++ headers in Docker build script"

Both are moot now that the z5 3.0.1 upgrade is merged into main: CMake looks for z5/z5.hxx again, and the z5 C++ headers come from the z5py >=3.0.1 conda package in conda_cpp.txt (no manual header install needed). The branch has been rebased onto the current main and those two commits dropped, leaving only the Docker/CUDA/Python change.

Note the Python 3.11 bump is now also required for the GPU build to solve, not just a nicety: z5py 3.0.x has no Python 3.10/3.9 build (3.11+ only), and build_conda.sh pulls z5 via conda_cpp.txt (z5py >=3.0.1).

Test plan

  • Trigger the Publish Docker image workflow on this branch and confirm the "Run Build Script" step passes (CUDA build + z5 3.0.1 via z5py on Python 3.11).

🤖 Generated with Claude Code

sameeul and others added 6 commits July 1, 2026 15:00
Upgrade the OME-Zarr readers from z5 2.0.20 (xtensor-based) to the
header-only z5 3.0.1 ArrayView API, removing the xtensor and xsimd
dependencies entirely.

- omezarr.h / raw_omezarr.h: replace xt::xarray + xtensor_access with
  z5::multiarray::makeView + array_access.hxx; read into plain
  std::vector buffers. No change to on-disk read behavior.
- CMakeLists.txt: drop the GCC 7.5 xtensor guard and the Boost
  find_package from the Z5 detection block (z5 3.0.1 needs neither).
- conda_cpp.txt / conda_cpp_mac.txt / environment.yml: pin
  z5py >=3.0.1 (the conda package that ships the z5 C++ headers) and
  remove xtensor / xsimd.

BREAKING CHANGE: OME-Zarr support now requires z5 3.0.1 and C++20;
xtensor/xsimd are no longer used.
Update the wheel-build prereq scripts for the z5 3.0.1 upgrade:

- Remove the xtl / xtensor / xsimd source builds (no longer needed).
- Bump z5 from 2.0.20 to 3.0.1.
- Install libdeflate before the z5 build so z5 3.0.1's
  find_package(libdeflate CONFIG REQUIRED) resolves (libdeflate was
  already built later in the script; it is moved up and kept
  unconditional since libtiff also depends on it).
- validate_prereqs.sh: drop the xtensor header check, add checks for
  z5 multiarray/array_access.hxx and the libdeflate CMake config.
z5py 3.0.x ships no Python 3.10 build (only 3.11-3.14 on all
platforms), so the 3.10-pinned conda environment could not solve
z5py >=3.0.1. Bump the ubuntu, mac and windows test jobs to 3.11.
z5 3.0.1 no longer needs Boost, but Apache Arrow does. Move the Boost
lookup from the Z5 block to the Arrow block. Keep it best-effort:
find_package(Boost QUIET) adds the include dirs when available, and
otherwise the build falls back to Boost headers under
$NYXUS_DEP_DIR/include (some prereq layouts ship Boost headers-only
with no CMake config). Arrow is not disabled on a Boost config-mode
miss, so headers-only Boost still builds.
Add GTest coverage for both z5-based OME-Zarr readers
(NyxusOmeZarrLoader and RawOmezarrLoader): geometry, exact pixel
values, full-image checksums, and multi-tile / partial-tile reads.

Ships two small bfio-generated zarr-v2 datasets under
tests/data/omezarr (512x512 single-tile and 1500x1200 2x2 tile grid
with partial edges); see the datasets' README for regeneration. Tests
are guarded by OMEZARR_SUPPORT so non-Z5 builds are unaffected.
- Replace cudatoolkit=11.5 conda packages with cuda-version=12.6,
  cuda-nvcc=12.6, cuda-cudart-dev=12.6, libcufft-dev (conda-forge
  CUDA 12 package names that include nvcc)
- Add -DCMAKE_CUDA_COMPILER=$CONDA_PREFIX/bin/nvcc so CMake finds
  the conda nvcc without relying on check_language(CUDA) discovery
- Bump PYTHON=3.9 -> 3.11 in build_conda.sh (3.9 is EOL)
- Update Dockerfile base image from nvidia/cuda:11.5.2-runtime-ubuntu20.04
  to nvidia/cuda:12.6.0-runtime-ubuntu22.04
- Update hardcoded nyxus-3.9 env path in publish_docker.yml to nyxus-3.11

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sameeul sameeul force-pushed the fix/docker-cuda12-python311 branch from 91b9f09 to 7ec899d Compare July 1, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant