Skip to content

Instantly share code, notes, and snippets.

View GuyMayer's full-sized avatar

Guy Mayer GuyMayer

  • Leighton Buzzard
  • 00:36 (UTC -12:00)
View GitHub Profile
#!/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'])
#!/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