Always giving 500 (no instances currently available), when trying to create a pod through api.
anyone know what's wrong in this?
import requests
url = "https://rest.runpod.io/v1/pods"
payload = {
"allowedCudaVersions": ["12.1"],
"cloudType": "SECURE",
"computeType": "GPU",
"containerDiskInGb": 20,
"dockerStartCmd": [
"bash",
"-c",
"apt update && apt install -y ffmpeg && cd /workspace/GoKaptureHub/apps/gif-generator && source .venv/bin/activate && python3 worker.py; tail -f /dev/null"
],
"globalNetworking": True,
"gpuCount": 1,
"gpuTypeIds": ["NVIDIA A100 80GB PCIe"],
"gpuTypePriority": "availability",
"imageName": "runpod/pytorch:2.2.0-py3.10-cuda12.1.1-devel-ubuntu22.04",
"interruptible": False,
"locked": False,
"name": "TEST USING API",
"networkVolumeId": "k7veh4j4n1",
"ports": ["8888/http", "22/tcp"],
"supportPublicIp": False,
"volumeMountPath": "/workspace",
"minDiskBandwidthMBps": 123,
"minDownloadMbps": 123,
"minRAMPerGPU": 8,
"minUploadMbps": 123
}
headers = {
"Authorization": "Bearer test_token",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.status_code)
print(response.json())
it is always giving
Status Code: 500
Response: {'error': 'create pod: There are no instances currently available', 'status': 500}
although through website it's always available
thanks.
2 Replies
"allowedCudaVersions": ["12.1"], <---- this
all machines are running on CUDA 12.4+
ok, let me try
resolved.
thanks a lot.