This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| from flask import Flask,request,jsonify | |
| from flask_cors import CORS | |
| import subprocess,os,sys | |
| app=Flask(__name__) | |
| CORS(app) | |
| T=os.getenv('RUNPOD_COMMAND_API_TOKEN','X') | |
| @app.route('/health') | |
| def h():return jsonify({'status':'healthy'}) | |
| @app.route('/api/exec',methods=['POST']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # --- 1. Install Dependencies --- | |
| echo "Updating packages and installing dependencies..." | |
| apt-get update | |
| apt-get install -y lshw python3-pip | |
| # Upgrade pip | |
| echo "Upgrading pip..." | |
| python -m pip install --upgrade pip |