Skip to content

Commit

Permalink
Add cudo provider (#38)
Browse files Browse the repository at this point in the history
* Add CudoCompute provider

Added cudocompute in OFFLINE PROVIDERS

Removed dist directory

Cudocompute disksize set to None

* Fixed Review Issues and Added Integrity Tests for Cudo

* Bump checkout action from v3 to v4 for cudo

* Adjust Spacing With Pre-Commit for Cudo

---------

Co-authored-by: Bihan  Rana <[email protected]>
  • Loading branch information
Bihan and Bihan Rana authored Feb 26, 2024
1 parent adcc0eb commit 2496090
Show file tree
Hide file tree
Showing 7 changed files with 559 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/catalogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,27 @@ jobs:
path: nebius.csv
retention-days: 1

catalog-cudo:
name: Collect Cudo catalog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
pip install pip -U
pip install -e '.[cudo]'
- name: Collect catalog
working-directory: src
run: python -m gpuhunt cudo --output ../cudo.csv
- uses: actions/upload-artifact@v4
with:
name: catalogs-cudo
path: cudo.csv
retention-days: 1

test-catalog:
name: Test catalogs integrity
needs:
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ nebius = [
datacrunch = [
"datacrunch"
]
all = ["gpuhunt[aws,azure,datacrunch,gcp,nebius]"]
cudo = [
"cudo_compute"
]
all = ["gpuhunt[aws,azure,cudo,datacrunch,gcp,nebius]"]
dev = [
"pre-commit",
"isort~=5.0",
Expand Down
5 changes: 5 additions & 0 deletions src/gpuhunt/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def main():
choices=[
"aws",
"azure",
"cudo",
"datacrunch",
"gcp",
"lambdalabs",
Expand Down Expand Up @@ -65,6 +66,10 @@ def main():
from gpuhunt.providers.vastai import VastAIProvider

provider = VastAIProvider()
elif args.provider == "cudo":
from gpuhunt.providers.cudo import CudoProvider

provider = CudoProvider()
else:
exit(f"Unknown provider {args.provider}")

Expand Down
2 changes: 1 addition & 1 deletion src/gpuhunt/_internal/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
logger = logging.getLogger(__name__)
version_url = "https://dstack-gpu-pricing.s3.eu-west-1.amazonaws.com/v1/version"
catalog_url = "https://dstack-gpu-pricing.s3.eu-west-1.amazonaws.com/v1/{version}/catalog.zip"
OFFLINE_PROVIDERS = ["aws", "azure", "datacrunch", "gcp", "lambdalabs", "nebius"]
OFFLINE_PROVIDERS = ["aws", "azure", "cudo", "datacrunch", "gcp", "lambdalabs", "nebius"]
ONLINE_PROVIDERS = ["tensordock", "vastai"]
RELOAD_INTERVAL = 4 * 60 * 60 # 4 hours

Expand Down
2 changes: 2 additions & 0 deletions src/gpuhunt/_internal/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ def get_compute_capability(gpu_name: str) -> Optional[Tuple[int, int]]:

KNOWN_GPUS = [
GPUInfo(name="A10", memory=24, compute_capability=(8, 6)),
GPUInfo(name="A40", memory=48, compute_capability=(8, 6)),
GPUInfo(name="A100", memory=40, compute_capability=(8, 0)),
GPUInfo(name="A100", memory=80, compute_capability=(8, 0)),
GPUInfo(name="A10G", memory=24, compute_capability=(8, 6)),
GPUInfo(name="A4000", memory=16, compute_capability=(8, 6)),
GPUInfo(name="A4500", memory=20, compute_capability=(8, 6)),
GPUInfo(name="A5000", memory=24, compute_capability=(8, 6)),
GPUInfo(name="A6000", memory=48, compute_capability=(8, 6)),
GPUInfo(name="H100", memory=80, compute_capability=(9, 0)),
Expand Down
Loading

0 comments on commit 2496090

Please sign in to comment.