Skip to content

infra: use apt python3.12 for base image and decouple cudaq image - #481

Open
rmshaffer wants to merge 18 commits into
mainfrom
rmshaffer/base-image-build-speedup
Open

infra: use apt python3.12 for base image and decouple cudaq image#481
rmshaffer wants to merge 18 commits into
mainfrom
rmshaffer/base-image-build-speedup

Conversation

@rmshaffer

@rmshaffer rmshaffer commented May 1, 2026

Copy link
Copy Markdown
Member

Issue #, if available:

Description of changes:

Two improvements here:

  1. Switches the base image to apt-installed python3.12, which reduces build time by ~50% and image size by ~10%.

  2. Makes the cudaq image independent of the base image, so that changes to both images can now be built in parallel; no need to wait for a new base image to be published to ECR before rebuilding the cudaq image.

Testing done:

Tested the container builds locally and ran tests.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rmshaffer
rmshaffer force-pushed the rmshaffer/base-image-build-speedup branch from 38ff561 to 1b4c49e Compare May 8, 2026 14:49
@rmshaffer rmshaffer changed the title infra: speed up base image build via apt packages infra: use apt python3.12 for base image and decouple cudaq image May 8, 2026
@rmshaffer
rmshaffer marked this pull request as ready for review May 8, 2026 15:40
@rmshaffer
rmshaffer requested a review from a team as a code owner May 8, 2026 15:40
@rmshaffer
rmshaffer requested review from AbeCoull and dtrenev May 8, 2026 21:46
@speller26

Copy link
Copy Markdown
Member

Do these improvements carry over to the other images?

@rmshaffer

Copy link
Copy Markdown
Member Author

Do these improvements carry over to the other images?

The tensorflow and pytorch images are based on SageMaker DLC images, which already have most dependencies. So this particular optimization only matters for the base and cudaq images.

@dtrenev

dtrenev commented May 11, 2026

Copy link
Copy Markdown
Contributor

Change makes sense to me. Haven't manually built the images to check, but I expect a "simple" MPI job to work with the BASE image and a CUDA-Q MPI job (e.g. the ones in cuda-q notebook 6) to work with the CUDAQ image.

dtrenev
dtrenev previously approved these changes May 11, 2026
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.

3 participants