Skip to content

Conversation

Slonegg
Copy link
Contributor

@Slonegg Slonegg commented Apr 18, 2025

Add CloudRift as a provider. To start simple, I integrated a VM-based service and a few GPU types.

Provider requirements:

{
  "data": {
    "config": {
      "VirtualMachine": {
        "cloudinit_url": "https://storage.googleapis.com/cloudrift-vm-disks/cloudinit/ubuntu-base.cloudinit",
        "image_url": "https://storage.googleapis.com/cloudrift-vm-disks/disks/ubuntu/24.04/noble-server-cloudimg-amd64.img",
        "ssh_key": [
          "my-key"
        ]
      }
    },
    "recipe": "Ubuntu 24.04 Server",
    "selector": {
      "ByInstanceTypeAndLocation": {
        "datacenters": [
          "us-east-nc-nr-1"
        ],
        "instance_type": "generic-cpu.1"
      }
    },
    "with_public_ip": false
  },
  "version": "~upcoming"
}
  • VM images with Ubuntu, OpenSSH, GPU drivers, and Docker with NVIDIA runtime
    • Yes, our default ones come with those above. If something is missing or needed in addition, we'll add it.

@r4victor r4victor requested a review from jvstme April 21, 2025 13:26
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.

@Slonegg, thanks for the PR, it is indeed a good starting point. Before we can merge, can you please take a look at my review comments? And also these two:

  • Please register the provider in the catalog (see the contributing guide, step 1.4).
  • Please lint and format the code with ruff check and ruff format (I think this is not well documented for gpuhunt, we'll update the docs).

Let me know if you'll need any assistance

Slonegg added 2 commits April 21, 2025 18:36
move test to integrity tests
add cloudrift to internal catalog
@Slonegg
Copy link
Contributor Author

Slonegg commented Apr 22, 2025

@Slonegg, thanks for the PR, it is indeed a good starting point. Before we can merge, can you please take a look at my review comments? And also these two:

* Please register the provider in the catalog (see the [contributing guide](https://github.com/dstackai/dstack/blob/master/contributing/BACKENDS.md), step 1.4).

* Please lint and format the code with `ruff check` and `ruff format` (I think this is not well documented for gpuhunt, we'll update the docs).

Let me know if you'll need any assistance

Thanks! Apologies for not following the guide carefully.

Please register the provider in the catalog (see the contributing guide, step 1.4).

Either OFFLINE_PROVIDERS or ONLINE_PROVIDERS in src/gpuhunt/_internal/catalog.py.

Added to OFFLINE_PROVIDERS

The python -m gpuhunt command in src/gpuhunt/__main__.py.

Modified the CLI and tested with with `python -m gpuhunt cloudrift --output cloudrift.txt

(offline providers) The CI workflow in .github/workflows/catalogs.yml.

Copied the runpod workflow and adjusted for cloudrift.

Please lint and format the code with ruff check and ruff format (I think this is not well documented for gpuhunt, we'll update the docs).

Done

use static catalog for test
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.

@Slonegg, thanks for the fixes. There is one last review comment and a couple of linter errors in ruff check and ruff format. Hope you can fix these and I'm ready to merge

@Slonegg
Copy link
Contributor Author

Slonegg commented Apr 22, 2025

@Slonegg, thanks for the fixes. There is one last review comment and a couple of linter errors in ruff check and ruff format. Hope you can fix these and I'm ready to merge

Ah. I didn't realize that ruff check checks for more issues than what ruff format fixes. Addressed.

@jvstme jvstme merged commit 1962b28 into dstackai:main Apr 22, 2025
6 checks passed
@jvstme
Copy link
Collaborator

jvstme commented Apr 22, 2025

@Slonegg, I've just published gpuhunt 0.1.4 with CloudRift support. To continue the implementation in dstack, please update the gpuhunt version in dstack/pyproject.toml and reinstall the dependencies. Thanks for your contribution!

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