Skip to content

Add CUDA Dockerfile with updated fmt library#3272

Draft
yassineAlouini wants to merge 4 commits intoboutproject:masterfrom
yassineAlouini:fix-cuda-dockerfile-fmt-issue-3233
Draft

Add CUDA Dockerfile with updated fmt library#3272
yassineAlouini wants to merge 4 commits intoboutproject:masterfrom
yassineAlouini:fix-cuda-dockerfile-fmt-issue-3233

Conversation

@yassineAlouini
Copy link

@yassineAlouini yassineAlouini commented Feb 10, 2026

Summary

Fixes #3233 by providing an updated CUDA-enabled Docker container with modern dependencies, wired into CI.

Changes

Updated dependencies

  • Ubuntu: 20.04 → 22.04 (better toolchain and CUDA support)
  • CUDA: 12.2.2 → 12.6.1 (latest stable release)
  • fmt: 10.0.0 → 11.0.2 (fixes missing fmt/base.h header)
  • RAJA: 2022.10.4 → 2024.07.0 (improved CUDA support)
  • Umpire: 2022.03.1 → 2024.07.0 (improved GPU memory management)
  • Spack: v0.21.1 → v0.23.0 (modern dependency management)
  • BLT: 0.5.3 → 0.6.2 (build system updates)

New files

  • .docker/cuda/Dockerfile — Multi-stage build with CUDA support
  • .docker/cuda/README.md — Documentation with usage examples
  • .docker/cuda/build.sh — Build script with --cuda-arch option
  • .docker/cuda/.dockerignore — Build optimization

CI integration

  • Added build-cuda job to .github/workflows/docker.yml that builds the setup-spack stage and publishes to ghcr.io/boutproject/bout-dev/boutdev-cuda:latest
  • Updated .github/workflows/tests.yml to use the repo-owned image instead of ghcr.io/ggeorgakoudis/boutdev-cuda:latest
  • Added workflow_dispatch trigger for manual rebuilds

Build fixes

  • CUDA_ARCH is a configurable build arg (default: 80 for Ampere), used throughout Spack specs and CMake config
  • Added libssl-dev to system packages (required by libevent/OpenSSL)
  • Constrained fftw and netcdf-cxx4 to use system mpich (^mpich) instead of building OpenMPI from source
  • Added openssl to spack external find to use system OpenSSL
  • Replaced deprecated MAINTAINER with LABEL maintainer=
  • Fixed default BOUT_COMMIT from main to master

Testing

  • Docker image (setup-spack stage) built and verified locally
  • Full Spack dependency installation completes successfully

🤖 Generated with Claude Code

Fixes boutproject#3233 by providing an updated CUDA-enabled Docker container with:
- Ubuntu 22.04 (updated from 20.04)
- CUDA 12.6.1 (updated from 12.2.2)
- fmt 11.0.2 (updated from 10.0.0, fixes missing fmt/base.h)
- RAJA 2024.07.0 with CUDA support
- Umpire 2024.07.0 for GPU memory management
- Spack v0.23.0 for dependency management

The Dockerfile includes proper CUDA configuration, comprehensive documentation,
and a build script for easy container creation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@yassineAlouini yassineAlouini marked this pull request as draft February 10, 2026 22:00
- Replace deprecated MAINTAINER with LABEL maintainer
- Fix default BOUT_COMMIT from main to master
- Make CUDA_ARCH a build arg used throughout Dockerfile and build.sh
- Add CUDA image build job to docker.yml workflow
- Update tests.yml to use repo-owned GHCR image
- Update README with build arg usage examples

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ZedThree
Copy link
Member

Thanks @yassineAlouini! We don't want to actually clone or build BOUT++ in the docker image though, we do that as part of the CI tests.

I think the version of spack likely also needs updating.

@dschwoerer
Copy link
Contributor

Should we add it to https://github.com/dschwoerer/bout-container-base/ instead?

We should probably move that repo to the boutproject though, if we keep using it for generating container base images. Can you do that, @ZedThree ?

@ZedThree
Copy link
Member

Should we add it to https://github.com/dschwoerer/bout-container-base/ instead?

We should probably move that repo to the boutproject though, if we keep using it for generating container base images. Can you do that, @ZedThree ?

You should have permissions to change ownership to boutproject

@dschwoerer
Copy link
Contributor

Indeed. I have transferred the repository 👍

@dschwoerer
Copy link
Contributor

I moved it over, but it seems to fail, while installing some spack related things:
https://github.com/boutproject/bout-container-base/actions/runs/21902716487/job/63234870950

Any idea @yassineAlouini ?

@yassineAlouini
Copy link
Author

@dschwoerer I am still working on this PR, I will move it out of the DRAFT state once it works (i.e. the docker image builds with CUDA). 🫡

- Add libssl-dev to system packages (libevent needs openssl headers)
- Constrain fftw and netcdf-cxx4 to use system mpich instead of
  building openmpi from source
- Add openssl to spack external find
- Add --show-log-on-error for better debugging

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dschwoerer
Copy link
Contributor

@yassineAlouini Do you mind working directly on a PR here:
boutproject/bout-container-base#39

This is the place where the container should be build. (Do not mind the failing fedora-ci, that is blocked by #3264 )

The CUDA Dockerfile now lives in boutproject/bout-container-base (PR boutproject#39).
This commit removes the local copy and updates CI to pull the pre-built
base image from ghcr.io/boutproject/bout-container-base:boutdev-cuda.

- Remove .docker/cuda/ (Dockerfile, build.sh, README.md, .dockerignore)
- Remove build-cuda job from docker.yml (built by container-base CI now)
- Update CUDA CI job in tests.yml to use the new container image
- Use bout-env.bash helper from the base image

Fixes boutproject#3233

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

CUDA builds failing due to missing fmt header

3 participants