homelab: runpod-lazy v5.3 CUDA driver version filter

11d83ea32623af4e349c91b88fc59a4ceb942042

permissionBRICK <40219477+permissionBRICK@users.noreply.github.com>

1 files changed, +5 -0Showing whitespace changes
homelab/runpod-lazy-proxy.py+5 -0
@@ -38,6 +38,9 @@ DATACENTERS = [d for d in os.environ.get('DATACENTERS', '').split(',') if d]
3838CLOUD_TYPE = os.environ.get('CLOUD_TYPE', 'SECURE')
3939IMAGE = os.environ.get('IMAGE', 'ghcr.io/permissionbrick/comfyui-runpod-worker:latest')
4040GPU_TYPES = os.environ.get('GPU_TYPES', 'NVIDIA RTX 6000 Ada Generation,NVIDIA L40S,NVIDIA L40,NVIDIA RTX A6000,NVIDIA A40').split(',')
41+# The worker image runs the cu12.8 runtime; hosts with older drivers fail at
42+# sampling time with "CUDA driver version is insufficient" (host lottery).
43+CUDA_VERSIONS = [v for v in os.environ.get('CUDA_VERSIONS', '12.8,12.9,13.0').split(',') if v]
4144POD_NAME = os.environ.get('POD_NAME', 'comfyui-lazy')
4245START_TIMEOUT = int(os.environ.get('START_TIMEOUT', '1500'))
4346HF_TOKEN = os.environ.get('HF_TOKEN', '')
@@ -176,6 +179,8 @@ def create_pod(values, datacenters=None):
176179 }
177180 if datacenters:
178181 body['dataCenterIds'] = datacenters
182+ if CUDA_VERSIONS:
183+ body['allowedCudaVersions'] = CUDA_VERSIONS
179184 pod = api('POST', '/pods', body)
180185 log(f"pod created: {pod['id']} models={values_key(values) or 'legacy-all'} {pod.get('machine', {}).get('gpuTypeId')} ${pod.get('costPerHr')}/hr dc={pod.get('machine', {}).get('dataCenterId') or (','.join(datacenters) if datacenters else 'any')}")
181186 return pod['id'], pod.get('machine', {}).get('gpuTypeId')