Skip to content

Commit 58bf7b3

Browse files
authored
Ensure docker args are passed for CPU pods too (#470)
This fixes a bug where calls to create CPU-only pods didn't pass the given docker args down to the GraphQL mutation. This variable is supported by both mutations, but the python argument was only being passed to the mutation in the GPU-pod case.
1 parent 0f4f022 commit 58bf7b3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

runpod/api/mutations/pods.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ def generate_pod_deployment_mutation(
8888
input_fields.append(f"minVcpuCount: {min_vcpu_count}")
8989
if min_memory_in_gb is not None:
9090
input_fields.append(f"minMemoryInGb: {min_memory_in_gb}")
91-
if docker_args is not None:
92-
input_fields.append(f'dockerArgs: "{docker_args}"')
91+
9392
if allowed_cuda_versions is not None:
9493
cuda_versions = ", ".join(f'"{v}"' for v in allowed_cuda_versions)
9594
input_fields.append(f"allowedCudaVersions: [{cuda_versions}]")
@@ -106,6 +105,8 @@ def generate_pod_deployment_mutation(
106105
else:
107106
input_fields.append("dataCenterId: null")
108107

108+
if docker_args is not None:
109+
input_fields.append(f'dockerArgs: "{docker_args}"')
109110
if country_code is not None:
110111
input_fields.append(f'countryCode: "{country_code}"')
111112
if container_disk_in_gb is not None:

0 commit comments

Comments
 (0)