Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies = [
"python-multipart>=0.0.16",
"filelock",
"psutil",
"gpuhunt==0.1.12",
"gpuhunt==0.1.13",
"argcomplete>=3.5.0",
"ignore-python>=0.2.0",
"orjson",
Expand Down
5 changes: 5 additions & 0 deletions src/dstack/_internal/core/backends/runpod/api_client.py
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also pass the CUDA version when creating clusters? See _generate_create_cluster_mutation

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If necessary, we can add it later in a separate PR, of course

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pass it here:

input_fields.append(f'minCudaVersion: "{RunpodProvider.MIN_CUDA_VERSION}"')

Please confirm

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is within _generate_pod_deployment_mutation, which is only used for individual pods. My comment is about clusters.

Anyways, you merged the gpuhunt PR without adding a filter for cluster offers, so it's better not to add it in dstack now

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing import Any, Dict, List, Optional

import requests
from gpuhunt.providers.runpod import RunpodProvider
from requests import Response

from dstack._internal.core.errors import BackendError, BackendInvalidCredentialsError
Expand Down Expand Up @@ -475,6 +476,8 @@ def _generate_pod_deployment_mutation(
)
input_fields.append(f"allowedCudaVersions: [{allowed_cuda_versions_string}]")

input_fields.append(f'minCudaVersion: "{RunpodProvider.MIN_CUDA_VERSION}"')

pod_deploy = "podFindAndDeployOnDemand" if bid_per_gpu is None else "podRentInterruptable"
# Format input fields
input_string = ", ".join(input_fields)
Expand Down Expand Up @@ -597,6 +600,8 @@ def _generate_create_cluster_mutation(
ports = ports.replace(" ", "")
input_fields.append(f'ports: "{ports}"')

input_fields.append(f'minCudaVersion: "{RunpodProvider.MIN_CUDA_VERSION}"')

# Format input fields
input_string = ", ".join(input_fields)
return f"""
Expand Down