Session¶
Interactive session engine.
- class renku.domain_model.session.ISessionProvider[source]¶
Bases:
object
Abstract class for a interactive session provider.
- abstract build_image(image_descriptor, image_name, config)[source]¶
Builds the container image.
- Parameters
image_descriptor – Path to the container image descriptor file.
image_name – Container image name.
config – Path to the session provider specific configuration YAML.
- abstract property name¶
Return session provider’s name.
- pre_start_checks(**kwargs)[source]¶
Perform any required checks on the state of the repository prior to starting a session.
The expectation is that this method will abort the session start if the checks are not successful or will take corrective actions to make sure that the session launches successfully. By default this method does not do any checks.
- abstract session_list(project_name, config)[source]¶
Lists all the sessions currently running by the given session provider.
- abstract session_open(project_name, session_name, **kwargs)[source]¶
Open a given interactive session.
- abstract session_start(image_name, project_name, config, cpu_request=None, mem_request=None, disk_request=None, gpu_request=None, **kwargs)[source]¶
Creates an interactive session.
- Parameters
image_name (str) – Container image name to be used for the interactive session.
project_name (str) – The project identifier.
config (Optional[Dict[str, Any]]) – Path to the session provider specific configuration YAML.
cpu_request (Optional[float]) – CPU request for the session.
mem_request (Optional[str]) – Memory size request for the session.
disk_request (Optional[str]) – Disk size request for the session.
gpu_request (Optional[str]) – GPU device request for the session.
- Returns
Provider message and a possible warning message.
- Return type