|
Download DEPLOY.md from boonthongvxy/lao-python-learn: direct link, hf CLI and curl.
- Browser
- Download file 2.17 kB
-
https://huggingface.co/spaces/boonthongvxy/lao-python-learn/resolve/main/DEPLOY.md
- Command line
-
hf download hf://spaces/boonthongvxy/lao-python-learn/DEPLOY.md
-
curl -L -o DEPLOY.md https://huggingface.co/spaces/boonthongvxy/lao-python-learn/resolve/main/DEPLOY.md
2.17 kB
A newer version of the Gradio SDK is available: 6.32.0
Deployment Guide — Lao Python Learning Platform
Summary: Free Hosting Options
| Service | Free Tier | Difficulty | Your Choice |
|---|---|---|---|
| Render | 512MB RAM, 5GB bandwidth | Easy | ✅ RECOMMENDED |
| Google Cloud Run | 2M invocations/month | Medium | Alternative |
| Hugging Face | Static only (PRO needed for Gradio) | Hard | Already created |
| PythonAnywhere | Limited free | Easy | Not recommended |
Firestore Clarification
Firestore = Database (stores data). NOT a hosting service.
- Cannot run Python/Gradio
- Can store quiz scores/results if needed later
- Would need Cloud Run or similar to host the app
Option 1: Render (RECOMMENDED)
Setup (5 minutes):
- Create GitHub repo with this code
- Sign up at https://render.com (use GitHub login)
- Click "New" → "Web Service"
- Connect your repository
- Deploy!
Manual Steps:
# On your local machine (Windows):
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/YOUR_USERNAME/lao-python-learn.git
git push -u origin main
Render Configuration:
- Build Command:
pip install -r requirements.txt - Start Command:
gradio app.py --server.port $PORT --server.host 0.0.0.0 - Env: PYTHON_VERSION=3.12
Result: https://lao-python-learn.onrender.com
Option 2: Google Cloud Run
Setup:
- Create project at https://console.cloud.google.com
- Enable Cloud Run API
- Build Docker image:
docker build -t gcr.io/YOUR_PROJECT/lao-python-learn:latest .
docker push gcr.io/YOUR_PROJECT/lao-python-learn:latest
- Deploy to Cloud Run
Free Tier: 2M invocations/month
What I've Prepared
Files in /home/bounthong/elearning-python/lao-python-learn/:
render.yaml- Render deployment configdeploy_render.py- Python deploy scriptdeploy_render.sh- Shell deploy scriptDEPLOY.md- This guiderequirements.txt- Updated with python-dotenv
Recommended Next Steps
- Install git on your Windows machine
- Push code to GitHub
- Connect to Render
- Deploy
Or I can guide you through any of these steps.