Package Installation#
Warning
This setup is intended for local development and testing purposes only.
It is not suitable for production use. The local autograding executors run student code with full access to the service database and filesystem, so a malicious submission could read or alter grades and other students’ work. Use the Kubernetes installation with KubeAutogradeExecutor for any deployment that grades untrusted student code.
This guide explains how to install the published grader-service backend and grader-labextension frontend packages from PyPI into your own environment. If you want to run from source instead, see the Quick installation or Installation from source guides.
Requirements#
Python 3.9+
JupyterHub >= 5.x (installation guide)
JupyterLab >= 4.x (installation guide)
Create a virtual environment#
Using venv:#
python -m venv grader
source grader/bin/activate
Using uv:#
uv venv grader
source grader/bin/activate
Using conda:#
conda create -n grader python
conda activate grader
1. Install grader-service (Python Backend)#
pip install grader-service
Or with uv:
uv pip install grader-service
2. Install grader-labextension (JupyterLab Frontend)#
pip install grader-labextension
Or with uv:
uv pip install grader-labextension
Installing the labextension registers the JupyterLab frontend and the server extension automatically; no manual jupyter labextension develop / jupyter server extension enable steps are required.
3. Configuration of Grader Service#
Generate a default configuration file:
grader-service --generate-config
Alternatively, use the example configuration files from the dev/local/token/ directory in the repository.
Run the migration to create the database:
grader-service-migrate -f <config-file-path>/grader_service_config.py
4. Start Grader Service and JupyterHub#
First start the grader-service:
grader-service -f <config-file-path>/grader_service_config.py
Then launch JupyterHub:
jupyterhub -f <config-file-path>/jupyterhub_config.py
Optional: Cleanup#
To uninstall all components:
pip uninstall grader-service grader-labextension