About

What a booking runs on its machine while it is on: the model behind an OpenAI API with a key per booking, a chat, and a JupyterLab in the browser, through a gateway in front of the portal

Provides

Models
CachedModelLabIncidentLabSessionSavedSessionSessionResumeStartTime
Services
LabSessionService
Routes
/sessions/sessions/<int:reservation_id>/sessions/<int:reservation_id>/chat/sessions/<int:reservation_id>/chat/file/sessions/<int:reservation_id>/chat/read/sessions/<int:reservation_id>/chat/search/sessions/<int:reservation_id>/continue/sessions/<int:reservation_id>/state/sessions/admin/incidents/sessions/admin/incidents/reviewed/sessions/admin/usage/sessions/api/node/<int:node>/sessions/blocked/sessions/gate
Signals
lab-incidentsession-endingsession-ready
Translations
es

Configuration

Setting Default What it does
LAB_SESSIONS_NODE_ADDRESSES 10.200.0.11,10.200.0.12 The machines on the WireGuard tunnel, in node order (node 1 first).
LAB_SESSIONS_MACHINE_GB 128 Memory of each machine, to give a model its share of the GPU.

These are the defaults. A product changes them in its own pyproject.toml, under [tool.splent.config], or in .env.deploy in production.

Dependencies

Requires
Works better with

In product lines

  • labcompute Optional in this line Needs auth lab_storage reservations

Extension points

Templates
lab_sessions/admin_incidents.htmllab_sessions/admin_usage.htmllab_sessions/blocked.htmllab_sessions/chat.htmllab_sessions/list.htmllab_sessions/over.htmllab_sessions/session.html
Services
LabSessionService
Models
CachedModelLabIncidentLabSessionSavedSessionSessionResumeStartTime
Routes
A refinement can add routes to its blueprint

Other features fill its hook slots. A refinement can override its templates and services or extend its models without forking it.

Compatibility

Python
>=3.13
SPLENT framework
No range declared
Python packages
pypdf>=5,<7