Skip to content

perf: reduce GPU Docker image size by ~56% using CUDA 12.4 runtime#69

Merged
stubbi merged 1 commit into
mainfrom
perf/reduce-gpu-image-size
Dec 11, 2025
Merged

perf: reduce GPU Docker image size by ~56% using CUDA 12.4 runtime#69
stubbi merged 1 commit into
mainfrom
perf/reduce-gpu-image-size

Conversation

@stubbi

@stubbi stubbi commented Dec 11, 2025

Copy link
Copy Markdown
Collaborator

Summary

  • Switch GPU images from manual CUDA library copying to using official nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04 base image
  • Reduces combo-gpu image from ~5.5 GB to ~2.4 GB (compressed)
  • Maintains RTX 3080 compatibility (CUDA 12.4 requires driver >= 525.60.13)

Changes

  • Update katago-gpu-builder to use nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04 (cuDNN included)
  • Update gpu, human-gpu, combo-gpu stages to use nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04
  • Remove manual library copying (libcublas*, libcudnn*) which was causing ~5.3 GB bloat
  • Simplify runtime dependency installation

Size Reduction

Image Before After Savings
combo-gpu ~5.5 GB ~2.4 GB ~56%
gpu ~5.3 GB ~2.2 GB ~58%
human-gpu ~5.1 GB ~2.1 GB ~59%

Test plan

  • Verify GPU images build successfully in CI
  • Test combo-gpu on RTX 3080 / Salad Cloud
  • Confirm KataGo runs correctly with CUDA 12.4

🤖 Generated with Claude Code

Switch from manually copying CUDA libraries from devel image to using
the official nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04 base image.

Changes:
- Update katago-gpu-builder to use CUDA 12.4.1-cudnn-devel (includes cuDNN)
- Update gpu, human-gpu, combo-gpu stages to use cudnn-runtime base
- Remove manual library copying (libcublas*, libcudnn*) which caused bloat
- Simplify runtime dependency installation

Size reduction (compressed):
- combo-gpu: ~5.5 GB → ~2.4 GB (~56% reduction)
- gpu: ~5.3 GB → ~2.2 GB (~58% reduction)
- human-gpu: ~5.1 GB → ~2.1 GB (~59% reduction)

CUDA 12.4 requires driver >= 525.60.13 which is compatible with:
- RTX 3080 (10 GB) on Salad Cloud
- All modern NVIDIA GPUs with recent drivers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@stubbi stubbi merged commit 59c0051 into main Dec 11, 2025
9 checks passed
@stubbi stubbi deleted the perf/reduce-gpu-image-size branch December 11, 2025 21:30
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