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.
- Returns
a unique id for the created interactive session.
- Return type
- abstract find_image(image_name, config)[source]¶
Search for the given container image.
- Parameters
image_name – Container image name.
config – Path to the session provider specific configuration YAML.
- Returns
True if the given container images is available locally.
- Return type
- abstract session_list(project_name, config)[source]¶
Lists all the sessions currently running by the given session provider.
- Parameters
project_name – Renku project name.
config – Path to the session provider specific configuration YAML.
- Returns
a list of sessions.
- abstract session_provider()[source]¶
Supported session provider.
- Returns
a tuple of
self
and engine type name.
- abstract session_start(image_name, project_name, config, client, cpu_request=None, mem_request=None, disk_request=None, gpu_request=None)[source]¶
Creates an interactive session.
- Parameters
image_name – Container image name to be used for the interactive session.
project_name – The project identifier.
config – Path to the session provider specific configuration YAML.
client – Renku client.
cpu_request – CPU request for the session.
mem_request – Memory size request for the session.
disk_request – Disk size request for the session.
gpu_request – GPU device request for the session.
- Returns
a unique id for the created interactive session.
- Return type
- abstract session_stop(project_name, session_name, stop_all)[source]¶
Stops all or a given interactive session.
- Parameters
client – Renku client.
session_name – The unique id of the interactive session.
stop_all – Specifies whether or not to stop all the running interactive sessions.
- Returns
True in case session(s) has been successfully stopped
- Return type