This document provides detailed instructions for setting up the development environment, installing dependencies, and running tests.
- Python 3.11+
- Docker and docker compose (for running the API container, Redis, and Garage)
- Redis
- Garage (or S3-compatible storage)
-
Clone the repository
git clone https://github.com/usnavy13/LibreCodeInterpreter.git cd LibreCodeInterpreter -
Create a virtual environment
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
cp .env.example .env # Edit .env with your configuration -
Start infrastructure services
docker compose up -d
-
Run the API server
uvicorn src.main:app --reload
For detailed testing instructions, please refer to TESTING.md.
# Run unit tests
pytest tests/unit/
# Run integration tests (in-process TestClient, no running stack needed)
pytest tests/integration/
# Run all tests with coverage
pytest --cov=src tests/The repository ships a single published/deployed container image: app.
The runtime-core and runtime-r Docker targets remain internal build stages,
not separately published packages.
# Build the local application image
docker build --target app -t code-interpreter:nsjail .By default docker compose up -d pulls the published image (ghcr.io/usnavy13/librecodeinterpreter:main). To run your locally built image instead, override API_IMAGE:
# Run a locally built image
API_IMAGE=code-interpreter:nsjail docker compose up -d
# Or pull a specific published tag
API_IMAGE=ghcr.io/usnavy13/librecodeinterpreter:<tag> docker compose up -dFor repeated local-build workflows, copy docker-compose.override.example.yml to docker-compose.override.yml and uncomment the build: block so docker compose up --build -d rebuilds from your checkout automatically.
For more details on the sandbox architecture, see ARCHITECTURE.md.