Skip to content

[UX]: Replace conda with uv in dstack's default Docker image #2625 #2652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 19, 2025

Conversation

peterschmidt85
Copy link
Contributor

  • Updated CUDA to 12.1.1
  • Use NVIDIA's devel image

* Updated CUDA to 12.1.1
* Use NVIDIA's devel image
@peterschmidt85 peterschmidt85 requested review from un-def and jvstme May 16, 2025 21:13
Copy link
Collaborator

@jvstme jvstme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the two Dockerfiles now only differ in the FROM clause, I'd suggest to keep just one Dockerfile and parametrize it. Something like that should work:

ARG FLAVOR
FROM nvidia/cuda:12.1.1-$FLAVOR-ubuntu20.04

This will allow to avoid duplication and related errors, such as forgetting to add stuff to one of the images.

@peterschmidt85 peterschmidt85 merged commit 90701ff into master May 19, 2025
25 checks passed
@peterschmidt85 peterschmidt85 deleted the fix-uv-cuda-docker branch May 19, 2025 11:36
docker buildx build --platform linux/amd64 --build-arg PYTHON=${{ matrix.python }} --push --provenance=false --tag dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }}-cuda-12.1 -f base/Dockerfile .
docker buildx build --platform linux/amd64 --build-arg PYTHON=${{ matrix.python }} --build-arg VERSION=${{ inputs.image_version }} --push --provenance=false --tag dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }}-cuda-12.1-devel -f base/devel.Dockerfile .
docker buildx build --platform linux/amd64 --build-arg FLAVOR=base --build-arg PYTHON=${{ matrix.python }} --push --provenance=false --tag dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }}-cuda-12.1 -f base/Dockerfile .
docker buildx build --platform linux/amd64 --build-arg FLAVOR=devel --build-arg PYTHON=${{ matrix.python }} --build-arg VERSION=${{ inputs.image_version }} --push --provenance=false --tag dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }}-cuda-12.1-devel -f base/devel.Dockerfile .
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also drop the deleted Dockerfile from the workflow, otherwise the workflow won't work

Suggested change
docker buildx build --platform linux/amd64 --build-arg FLAVOR=devel --build-arg PYTHON=${{ matrix.python }} --build-arg VERSION=${{ inputs.image_version }} --push --provenance=false --tag dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }}-cuda-12.1-devel -f base/devel.Dockerfile .
docker buildx build --platform linux/amd64 --build-arg FLAVOR=devel --build-arg PYTHON=${{ matrix.python }} --build-arg VERSION=${{ inputs.image_version }} --push --provenance=false --tag dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }}-cuda-12.1-devel -f base/Dockerfile .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done via #2659

Comment on lines +63 to +64
docker buildx build --platform linux/amd64 --build-arg FLAVOR=base --build-arg PYTHON=${{ matrix.python }} --push --provenance=false --tag dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }}-cuda-12.1 -f base/Dockerfile .
docker buildx build --platform linux/amd64 --build-arg FLAVOR=devel --build-arg PYTHON=${{ matrix.python }} --build-arg VERSION=${{ inputs.image_version }} --push --provenance=false --tag dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }}-cuda-12.1-devel -f base/devel.Dockerfile .
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the devel image no longer depends on the base image, it also makes sense to move FLAVOR to the job matrix (line 47), so that base and devel images can be built in parallel

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done via #2659

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.

2 participants