Session
Interactive session engine.
- class renku.domain_model.session.ISessionProvider[source]
Bases:
object
Abstract class for an 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 find_image(image_name, config)[source]
Search for the given container image.
- Parameters:
image_name (str) – Container image name.
config – Path to the session provider specific configuration YAML.
- Returns:
True if the given container images is available locally.
- Return type:
bool
- force_build_image(**kwargs)[source]
Whether we should force build the image directly or check for an existing image first.
- 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)[source]
Lists all the sessions currently running by the given session provider.
- Parameters:
project_name (str) – Renku project name.
- Returns:
a list of sessions.
- abstract session_open(project_name, session_name, **kwargs)[source]
Open a given interactive session.
- Parameters:
project_name (str) – Renku project name.
session_name (Optional[str]) – The unique id of the 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:
Tuple[str, str]
- abstract session_stop(project_name, session_name, stop_all)[source]
Stops all or a given interactive session.
- Parameters:
project_name (str) – Project’s name.
session_name (str, optional) – The unique id of the interactive session.
stop_all (bool) – Specifies whether to stop all the running interactive sessions.
- Returns:
The status of running and stopped sessions
- Return type: