diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a55a65f1f..f8a364568 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,10 +103,10 @@ jobs: - name: Upload pip package run: | VERSION=$((${{ github.run_number }} + 150)) - MINIFORGE_IMAGE=$(cat cli/dstack/version.py | grep miniforge_image) + BASE_IMAGE=$(cat cli/dstack/version.py | grep base_image) echo "__version__ = \"$VERSION\"" > cli/dstack/version.py echo "__is_release__ = False" >> cli/dstack/version.py - echo $MINIFORGE_IMAGE >> cli/dstack/version.py + echo $BASE_IMAGE >> cli/dstack/version.py cp README.md cli python setup.py sdist bdist_wheel python -m twine upload --repository testpypi --username ${{ secrets.TESTPYPI_USERNAME }} --password ${{ secrets.TESTPYPI_PASSWORD }} dist/* diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 74b53a6a9..7fd519811 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -36,11 +36,11 @@ jobs: uses: docker/setup-qemu-action@v2 - name: Build and upload to DockerHub run: | - docker buildx build --platform linux/arm64/v8 --build-arg PYTHON=${{ matrix.python }} --push --provenance=false --tag dstackai/miniforge:py${{ matrix.python }}-${{ inputs.image_version }}-arm64 -f cpu/Dockerfile . - docker buildx build --platform linux/amd64 --build-arg PYTHON=${{ matrix.python }} --push --provenance=false --tag dstackai/miniforge:py${{ matrix.python }}-${{ inputs.image_version }}-amd64 -f cpu/Dockerfile . - docker manifest create dstackai/miniforge:py${{ matrix.python }}-${{ inputs.image_version }} --amend dstackai/miniforge:py${{ matrix.python }}-${{ inputs.image_version }}-arm64 --amend dstackai/miniforge:py${{ matrix.python }}-${{ inputs.image_version }}-amd64 - docker manifest push dstackai/miniforge:py${{ matrix.python }}-${{ inputs.image_version }} - docker buildx build --platform linux/amd64 --build-arg PYTHON=${{ matrix.python }} --push --provenance=false --tag dstackai/miniforge:py${{ matrix.python }}-${{ inputs.image_version }}-cuda-11.8 -f cuda/Dockerfile . + docker buildx build --platform linux/arm64/v8 --build-arg PYTHON=${{ matrix.python }} --push --provenance=false --tag dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }}-arm64 -f cpu/Dockerfile . + docker buildx build --platform linux/amd64 --build-arg PYTHON=${{ matrix.python }} --push --provenance=false --tag dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }}-amd64 -f cpu/Dockerfile . + docker manifest create dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }} --amend dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }}-arm64 --amend dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }}-amd64 + docker manifest push dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }} + docker buildx build --platform linux/amd64 --build-arg PYTHON=${{ matrix.python }} --push --provenance=false --tag dstackai/base:py${{ matrix.python }}-${{ inputs.image_version }}-cuda-11.8 -f cuda/Dockerfile . build-aws-images: defaults: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e03d657ca..37ea74962 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,10 +79,10 @@ jobs: - name: Upload pip package run: | VERSION=${GITHUB_REF#refs/tags/} - MINIFORGE_IMAGE=$(cat cli/dstack/version.py | grep miniforge_image) + BASE_IMAGE=$(cat cli/dstack/version.py | grep base_image) echo "__version__ = \"$VERSION\"" > cli/dstack/version.py echo "__is_release__ = True" >> cli/dstack/version.py - echo $MINIFORGE_IMAGE >> cli/dstack/version.py + echo $BASE_IMAGE >> cli/dstack/version.py cp README.md cli python setup.py sdist bdist_wheel python -m twine upload --repository pypi --username ${{ secrets.PYPI_USERNAME }} --password ${{ secrets.PYPI_PASSWORD }} dist/* diff --git a/cli/dstack/_internal/backend/aws/runners.py b/cli/dstack/_internal/backend/aws/runners.py index e852dc343..91a13facf 100644 --- a/cli/dstack/_internal/backend/aws/runners.py +++ b/cli/dstack/_internal/backend/aws/runners.py @@ -650,7 +650,7 @@ def _get_ami_image( image_name = "dstack-" if cuda: image_name += "cuda-" - image_name += version.miniforge_image + image_name += version.base_image response = ec2_client.describe_images( Filters=[ diff --git a/cli/dstack/_internal/backend/azure/compute.py b/cli/dstack/_internal/backend/azure/compute.py index b9d7a436d..aea70e20d 100644 --- a/cli/dstack/_internal/backend/azure/compute.py +++ b/cli/dstack/_internal/backend/azure/compute.py @@ -206,7 +206,7 @@ def _get_image_ref( image_name = "dstack-" if cuda: image_name += "cuda-" - image_name += version.miniforge_image + image_name += version.base_image image = compute_client.community_gallery_images.get( location=location, diff --git a/cli/dstack/_internal/backend/gcp/compute.py b/cli/dstack/_internal/backend/gcp/compute.py index 1a679c8c0..ac9d10965 100644 --- a/cli/dstack/_internal/backend/gcp/compute.py +++ b/cli/dstack/_internal/backend/gcp/compute.py @@ -421,7 +421,7 @@ def _get_image_name( image_prefix = "dstack-" if len(instance_type.resources.gpus) > 0: image_prefix += "cuda-" - image_prefix += version.miniforge_image.replace(".", "-") + image_prefix += version.base_image.replace(".", "-") list_request = compute_v1.ListImagesRequest() list_request.project = "dstack" diff --git a/cli/dstack/_internal/configurators/__init__.py b/cli/dstack/_internal/configurators/__init__.py index 9d8129bf2..308fb1cbb 100644 --- a/cli/dstack/_internal/configurators/__init__.py +++ b/cli/dstack/_internal/configurators/__init__.py @@ -187,7 +187,7 @@ def build_commands(self) -> List[str]: def entrypoint(self) -> Optional[List[str]]: if self.conf.entrypoint is not None: return shlex.split(self.conf.entrypoint) - if self.conf.image is None: # dstackai/miniforge + if self.conf.image is None: # dstackai/base return ["/bin/bash", "-i", "-c"] if self.commands(): # custom docker image with commands return ["/bin/sh", "-i", "-c"] @@ -200,8 +200,8 @@ def image_name(self) -> str: if self.conf.image is not None: return self.conf.image if self.profile.resources and self.profile.resources.gpu: - return f"dstackai/miniforge:py{self.python()}-{version.miniforge_image}-cuda-11.8" - return f"dstackai/miniforge:py{self.python()}-{version.miniforge_image}" + return f"dstackai/base:py{self.python()}-{version.base_image}-cuda-11.8" + return f"dstackai/base:py{self.python()}-{version.base_image}" def cache_specs(self) -> List[job.CacheSpec]: return [ diff --git a/cli/dstack/version.py b/cli/dstack/version.py index 8a621fa00..48839456d 100644 --- a/cli/dstack/version.py +++ b/cli/dstack/version.py @@ -1,3 +1,3 @@ __version__ = None __is_release__ = False -miniforge_image = "0.3" +base_image = "0.3" diff --git a/docs/blog/posts/v0.10.5-release.md b/docs/blog/posts/v0.10.5-release.md index ff6af96ee..d4a273aa6 100644 --- a/docs/blog/posts/v0.10.5-release.md +++ b/docs/blog/posts/v0.10.5-release.md @@ -32,7 +32,7 @@ Once the project is configured, feel free to run dev environments and tasks in L ## Custom Docker images -By default, `dstack` uses its own base [Docker images](https://hub.docker.com/r/dstackai/miniforge/tags) to run +By default, `dstack` uses its own base [Docker images](https://hub.docker.com/r/dstackai/base/tags) to run dev environments and tasks. These base images come pre-configured with Python, Conda, and essential CUDA drivers. However, there may be times when you need additional dependencies that you don't want to install every time you run your dev environment or task. diff --git a/runner/ami/packer/provisioners/docker-image-with-cuda.sh b/runner/ami/packer/provisioners/docker-image-with-cuda.sh index 244a1eec2..a9f1228e7 100644 --- a/runner/ami/packer/provisioners/docker-image-with-cuda.sh +++ b/runner/ami/packer/provisioners/docker-image-with-cuda.sh @@ -3,11 +3,11 @@ set -e IMAGES=" - dstackai/miniforge:py3.11-${IMAGE_VERSION}-cuda-11.8 - dstackai/miniforge:py3.10-${IMAGE_VERSION}-cuda-11.8 - dstackai/miniforge:py3.9-${IMAGE_VERSION}-cuda-11.8 - dstackai/miniforge:py3.8-${IMAGE_VERSION}-cuda-11.8 - dstackai/miniforge:py3.7-${IMAGE_VERSION}-cuda-11.8 + dstackai/base:py3.11-${IMAGE_VERSION}-cuda-11.8 + dstackai/base:py3.10-${IMAGE_VERSION}-cuda-11.8 + dstackai/base:py3.9-${IMAGE_VERSION}-cuda-11.8 + dstackai/base:py3.8-${IMAGE_VERSION}-cuda-11.8 + dstackai/base:py3.7-${IMAGE_VERSION}-cuda-11.8 " echo "START pull image" for img in $IMAGES; do diff --git a/runner/ami/packer/provisioners/docker-image-without-cuda.sh b/runner/ami/packer/provisioners/docker-image-without-cuda.sh index e84ace9c7..5fc560262 100644 --- a/runner/ami/packer/provisioners/docker-image-without-cuda.sh +++ b/runner/ami/packer/provisioners/docker-image-without-cuda.sh @@ -3,11 +3,11 @@ set -e IMAGES=" - dstackai/miniforge:py3.11-${IMAGE_VERSION} - dstackai/miniforge:py3.10-${IMAGE_VERSION} - dstackai/miniforge:py3.9-${IMAGE_VERSION} - dstackai/miniforge:py3.8-${IMAGE_VERSION} - dstackai/miniforge:py3.7-${IMAGE_VERSION} + dstackai/base:py3.11-${IMAGE_VERSION} + dstackai/base:py3.10-${IMAGE_VERSION} + dstackai/base:py3.9-${IMAGE_VERSION} + dstackai/base:py3.8-${IMAGE_VERSION} + dstackai/base:py3.7-${IMAGE_VERSION} " echo "START pull image" for img in $IMAGES; do