# Runtimes Runtimes are containers that encapsulate a Method. They can be seen as minimal virtual environments made of an operating system and all dependencies required by a particular Method. The technology and the list of available Runtimes is strictly related to type of the Infrastructure. In an Infrastructure of type Docker or Docker Swarm cluster the available Runtimes are listed in a registry of Docker containers for example. # ๐Ÿณ Runtimes in CCP A **runtime** defines the environment where a Method is executed. It includes the base operating system, installed software, and dependencies. In CCP, runtimes are implemented as **container images** (e.g., Docker), and selected via the `ccpimage` input. --- ## ๐Ÿงพ What Is a Runtime? A runtime is a pre-configured execution environment. It contains: - A base image (e.g., Ubuntu, Alpine) - Pre-installed tools (e.g., Python, GDAL, Java, R) - A predefined entrypoint (`/bin/bash` by default) --- ## ๐Ÿ“ฆ Example Runtimes | Image Name | Description | |--------------------|--------------------------------------------| | `python:3.9` | Standard Python 3.9 environment | | `python:3.9-gdal` | Python with geospatial libraries (GDAL) | | `r-base:4.2` | R language runtime | | `jupyter/python3` | Jupyter-enabled Python environment | | `debian:bookworm` | Minimal OS, for low-dependency methods | | `bash` | Generic shell-based execution | You can find the list of supported runtimes in the `ccpimage` dropdown. --- ## ๐Ÿ›  Specifying the Runtime In your method definition (`method.json`), add: ```json "inputs": { "ccpimage": { "id": "ccpimage", "title": "Runtime", "schema": { "type": "string", "format": "ccpimage", "enum": ["python:3.9", "r-base:4.2", "bash"] }, "minOccurs": 1, "maxOccurs": 1 } } ``` The selected value will determine which container is used during execution. --- ## ๐Ÿงฑ Custom Runtimes (Consolidated) Advanced users can prepare a **custom runtime image** that: - Includes all dependencies pre-installed - Embeds the algorithm itself - Requires no external downloads at execution time This is part of the [consolidation process](/04_methods_development/08_consolidation.md). --- ## โš™๏ธ Runtime and Infrastructure Compatibility Each runtime must be compatible with the selected **infrastructure**: | Infrastructure type | Runtime type | |---------------------|----------------------| | `docker` | Docker image | | `lxd-cluster` | LXD image | | `kubernetes` | Containerized runtime| Controllers ensure the correct environment is used during scheduling. --- ## ๐Ÿ”— Related Pages - ๐Ÿงฑ [Runtime architecture](/05_advanced_topics/01_architecture/02_runtime_architecture.md) - ๐Ÿงฌ [Execution lifecycle](./01_execution_lifecycle.md) - โš™๏ธ [Method JSON structure](/04_methods_development/07_method_json.md) - ๐Ÿงฐ [Consolidation guide](/04_methods_development/08_consolidation.md)