-
Notifications
You must be signed in to change notification settings - Fork 178
[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
Conversation
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
There was a problem hiding this 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.
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 . |
There was a problem hiding this comment.
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
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 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done via #2659
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 . |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done via #2659