Deploying the LLM Grader on Render
๐ Overview
LLM grader is generally hosted on a server. We suggest Render that can directly load from a GitHub repository and a persistent disk. Render handles the build, environment, and hosting automatically, so deployment is simple and repeatable.
A Render deployment consists of:
- a Web Service running the Flask application
- a Persistent Disk mounted at
/var/data - environment variables for admin authentication and configuration
- automatic redeploys on Git pushes
The grader stores uploaded solution packages on the persistent disk, so course content survives restarts and redeploys. Before starting you will need to create a Render account, by linking your GitHub to the Render.
๐ 1. Prepare Your Repository
Your GitHub repository should contain:
llmgrader/
app.py
requirements.txt
llmgrader/
routes/
services/
templates/
static/
...
Make sure:
requirements.txtincludes all dependenciesgunicornis listed (Render uses it to run the app)- the app exposes
appat the top level (e.g., inapp.py)
Example app.py entry point:
from llmgrader import create_app
app = create_app()
๐งฑ 2. Create a Persistent Disk on Render
In the Render dashboard:
- Go to Disks
- Click New Disk
- Name it something like
grader-data - Choose a size (1โ2 GB is plenty)
- Set the mount path to:
/var/data
This directory will store:
- extracted solution packages
- logs (if you choose to write any)
- future assets such as images
Render guarantees that /var/data persists across deploys.
๐ 3. Create the Web Service
- Click New โ Web Service
- Connect your GitHub repo
- Use these settings:
Environment:
Python 3.x
Build Command:
pip install -r requirements.txt
Start Command:
gunicorn app:app
Instance Type:
- Start with Starter or Basic
- Upgrade later if needed
Persistent Disk:
- Attach the disk you created
- Mount it at
/var/data
๐ 4. Set Environment Variables
In the Render service settings, add:
| Variable | Suggested value | Remarks |
|---|---|---|
LLMGRADER_ADMIN_PASSWORD | Any | Password for entering admin pages |
PYTHON_VERSION | 3.12.3 | Update with python version |
LLMGRADER_STORAGE_PATH | /var/data/ | Root for persistent storage |
๐ 5. Deploy and Verify
Render will:
- clone your repo
- install dependencies
- start the app with Gunicorn
- mount the persistent disk
Once deployed, render assign your service a unique URL such as:
https://llmgrader-xxxx.onrender.com
Use the URL shown in your Render dashboard.
๐ ๏ธ 6. Redeploying
Render redeploys automatically when you push to the main branch.
You can also trigger a manual deploy from the dashboard.
Uploads and course content remain intact because they live on the persistent disk.
๐งน 7. Cleaning or Resetting the Disk (Optional)
If you ever need to reset the grader:
- SSH into the instance (Render Shell)
- Remove the contents of
/var/data/soln_repo - Or delete and recreate the disk from the dashboard
This does not affect your code deployment.
Once you are deployed, you can upload the course package