[UX]: Replace conda with uv in dstack's default Docker image #2625#2652
Merged
peterschmidt85 merged 4 commits intomasterfrom May 19, 2025
Merged
[UX]: Replace conda with uv in dstack's default Docker image #2625#2652peterschmidt85 merged 4 commits intomasterfrom
peterschmidt85 merged 4 commits intomasterfrom
Conversation
Contributor
peterschmidt85
commented
May 16, 2025
- Updated CUDA to 12.1.1
- Use NVIDIA's devel image
* Updated CUDA to 12.1.1 * Use NVIDIA's devel image
jvstme
approved these changes
May 19, 2025
Collaborator
jvstme
left a comment
There was a problem hiding this comment.
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.04This will allow to avoid duplication and related errors, such as forgetting to add stuff to one of the images.
jvstme
reviewed
May 19, 2025
| 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 . |
Collaborator
There was a problem hiding this comment.
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 . |
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 . |
Collaborator
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.