How to start a pod using command line runpodctl or python sdk
Solution:Jump to solution
read more @Asad Jamal Cognify here
https://github.com/runpod/runpod-python?tab=readme-ov-file#gpu-cloud-pods...
GitHub
GitHub - runpod/runpod-python: 🐍 | Python library for RunPod API an...
🐍 | Python library for RunPod API and serverless worker SDK. - GitHub - runpod/runpod-python: 🐍 | Python library for RunPod API and serverless worker SDK.
11 Replies
It worked after a few minutes
Can anyone guide me as to how to start a pod using python sdk?
mmm
did it work with the runpodctl too?
import runpod
runpod.api_key = "your_runpod_api_key_found_under_settings"
Get all my pods
pods = runpod.get_pods()
Get a specific pod
pod = runpod.get_pod(pod.id)
Create a pod
pod = runpod.create_pod("test", "runpod/stack", "NVIDIA GeForce RTX 3070")
Stop the pod
runpod.stop_pod(pod.id)
Resume the pod
runpod.resume_pod(pod.id)
Terminate the pod
runpod.terminate_pod(pod.id)
Solution
read more @Asad Jamal Cognify here
https://github.com/runpod/runpod-python?tab=readme-ov-file#gpu-cloud-pods
GitHub
GitHub - runpod/runpod-python: 🐍 | Python library for RunPod API an...
🐍 | Python library for RunPod API and serverless worker SDK. - GitHub - runpod/runpod-python: 🐍 | Python library for RunPod API and serverless worker SDK.
It does. But not on the first attempt.
hmm weird maybe its not in stopped
@nerdylive Bro can you help me receive json file on the pod?
I am running a flask app on 5000
It starts the dev server how do send a post request to it with json using curl and postman?
I want to use the proxy.runpod.net later but current I am able to accomplish it with curl on localhost
As well as on the flask screen
Hmm you need to expose the port first I forgot how, please check the docs
Then press connect on Runpod's website
You'll get the link
Thanks man. I forgot to expose the port. It worked now
I have yet to test the python sdk. Will let you know if that worked
Alr that's great
@nerdylive The python sdk works. Thanks for that too.
No problem bro