Skip to main content
Lyceum Cloud supports two Docker execution modes: single image and Compose stack. Both stream logs back the same way as Python runs.

Single image

CLI

lyceum docker run python:3.11-slim \
  -c "python -c 'print(1+1)'" \
  -m cpu

REST API

curl -X POST https://api.lyceum.technology/api/v2/external/execution/image/start \
  -H "Authorization: Bearer $LYCEUM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "docker_image_ref": "python:3.11-slim",
    "docker_run_cmd": ["python", "-c", "print(1+1)"],
    "machine_type": "cpu",
    "docker_registry_credential_type": "none"
  }'

Private registries

For private images, set docker_registry_credential_type to basic (with username/password) or aws (with aws_access_key_id, aws_secret_access_key, aws_session_token, aws_region) for ECR.

Docker Compose

CLI

lyceum compose run docker-compose.yml --machine gpu.a100

REST API

curl -X POST https://api.lyceum.technology/api/v2/external/execution/compose/start \
  -H "Authorization: Bearer $LYCEUM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "compose_file_code": "version: \"3\"\nservices:\n  app:\n    image: python:3.11-slim\n    command: python -c \"print(1+1)\"",
    "machine_type": "cpu"
  }'

Aborting

curl -X POST https://api.lyceum.technology/api/v2/external/execution/image/abort/<execution_id> \
  -H "Authorization: Bearer $LYCEUM_API_KEY"
The same /abort/{execution_id} shape exists under execution/streaming/ and execution/compose/.