#How to start a pod using command line runpodctl or python sdk

1 messages · Page 1 of 1 (latest)

desert cliff
tropic mauveBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

desert cliff
#

It worked after a few minutes

#

Can anyone guide me as to how to start a pod using python sdk?

summer lark
#

mmm

#

did it work with the runpodctl too?

summer lark
desert cliff
summer lark
#

hmm weird maybe its not in stopped

desert cliff
#

@summer lark Bro can you help me receive json file on the pod?

I am running a flask app on 5000

from flask import Flask, request, jsonify

app = Flask(__name__)

@app.route('/finetune', methods=['POST'])
def receive_finetune_request():
    data = request.get_json()
    bot_id = data.get('bot_id')
    print(bot_id)
    return jsonify({"message": "Received bot_id", "bot_id": bot_id}), 200

if __name__ == "__main__":
    app.run(host='0.0.0.0', port=5000)
python app.py```

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

```bash
 curl -X 'POST' http://127.0.0.1:5000/finetune -H 'Content-Type: application/json' -d '{"bot_id": "112547"}'
{"bot_id":"112547","message":"Received bot_id"}

As well as on the flask screen

112547
127.0.0.1 - - [28/May/2024 12:28:25] "POST /finetune HTTP/1.1" 200 -
summer lark
#

Then press connect on Runpod's website

#

You'll get the link

desert cliff
#

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

summer lark
#

Alr that's great

desert cliff
#

@summer lark The python sdk works. Thanks for that too.

summer lark
#

No problem bro