File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,8 @@ def create_pod(
107
107
template_id : Optional [str ] = None ,
108
108
network_volume_id : Optional [str ] = None ,
109
109
allowed_cuda_versions : Optional [list ] = None ,
110
+ min_download = None ,
111
+ min_upload = None ,
110
112
) -> dict :
111
113
"""
112
114
Create a pod
@@ -125,7 +127,8 @@ def create_pod(
125
127
for example {EXAMPLE_VAR:"example_value", EXAMPLE_VAR2:"example_value 2"}, will
126
128
inject EXAMPLE_VAR and EXAMPLE_VAR2 into the pod with the mentioned values
127
129
:param template_id: the id of the template to use for the pod
128
-
130
+ :param min_download: minimum download speed in Mbps
131
+ :param min_upload: minimum upload speed in Mbps
129
132
:example:
130
133
131
134
>>> pod_id = runpod.create_pod("test", "runpod/stack", "NVIDIA GeForce RTX 3070")
@@ -167,6 +170,8 @@ def create_pod(
167
170
template_id ,
168
171
network_volume_id ,
169
172
allowed_cuda_versions ,
173
+ min_download ,
174
+ min_upload ,
170
175
)
171
176
)
172
177
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ def generate_pod_deployment_mutation(
28
28
template_id = None ,
29
29
network_volume_id = None ,
30
30
allowed_cuda_versions : Optional [List [str ]] = None ,
31
+ min_download = None ,
32
+ min_upload = None ,
31
33
):
32
34
"""
33
35
Generates a mutation to deploy a pod on demand.
@@ -89,9 +91,14 @@ def generate_pod_deployment_mutation(
89
91
)
90
92
input_fields .append (f"allowedCudaVersions: [{ allowed_cuda_versions_string } ]" )
91
93
94
+ if min_download is not None :
95
+ input_fields .append (f'minDownload: { min_download } ' )
96
+
97
+ if min_upload is not None :
98
+ input_fields .append (f'minUpload: { min_upload } ' )
99
+
92
100
# Format input fields
93
101
input_string = ", " .join (input_fields )
94
-
95
102
return f"""
96
103
mutation {{
97
104
podFindAndDeployOnDemand(
You can’t perform that action at this time.
0 commit comments