Development Guide¶
Dependency Flow¶
- Job submitted with
job_type: "data-processing"(hasrequirements: [pandas, numpy]) - Worker writes validated requirements to
/input/_requirements.txt - Container starts,
entrypoint.shrunsuv pip install -r /input/_requirements.txt - Code runs as
sandboxuser (uid 1000) viagosu
For network-isolated jobs with deps, use pre-built images via the REST API:
curl -X POST http://localhost:8000/job-types/data-processing/build
# Then set base_image in job type config
Common Issues¶
- RuntimeUnavailableError: gVisor not available -> Install gVisor: https://gvisor.dev/docs/user_guide/install/ or set
security_mode: permissivefor dev - ImageNotFound: code-executor:latest -> Build image first:
docker build -t code-executor:latest -f docker/Dockerfile.executor . - PostgreSQL migration/connection errors -> Verify
database_urland database reachability - Test isolation -> Use
reset_config()and temp database pattern fromtests/test_api.py - Dep install fails (network) -> Jobs with requirements need network; use pre-built for true isolation