> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lyceum.technology/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Docker Containers

> Submit Docker images and Docker Compose stacks to Lyceum Cloud

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

```bash theme={null}
lyceum docker run python:3.11-slim \
  -c "python -c 'print(1+1)'" \
  -m cpu
```

### REST API

```bash theme={null}
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

```bash theme={null}
lyceum compose run docker-compose.yml --machine gpu.a100
```

### REST API

```bash theme={null}
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

```bash theme={null}
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/`.
