schrodinger.autoinstall.infra module

schrodinger.autoinstall.infra.get_hostname() str

Returns the hostname of the machine.

Returns:

The hostname.

schrodinger.autoinstall.infra.get_os_info() tuple[OperatingSystem, str]

Detects the Linux distribution.

Returns:

A tuple containing the OperatingSystem enum member and a full version string (e.g., ‘ubuntu 22.04’).

schrodinger.autoinstall.infra.get_cpu_cores() str

Detects the number of available CPU cores.

Returns:

The number of cores as a string.

schrodinger.autoinstall.infra.get_gpu_info() list

Extracts Nvidia product names using the lshw -C display command.

Handles multiple ‘product:’ lines and removes the *-graphics section.

Returns:

A list of extracted product names, or an empty list if none are found.

schrodinger.autoinstall.infra.get_gpu_device_node_files() list | None

Retrieves a list of device node files for all available NVIDIA GPUs.

For further information, see the NVML API documentation.

Returns:

A list of device node files (e.g., ‘/dev/nvidia0’), or None if an error occurs during pynvml initialization.

schrodinger.autoinstall.infra.get_major_cuda_version() str

Detects whether the installed NVIDIA driver supports CUDA 12+.

Uses nvmlSystemGetDriverVersion (available in pynvml 8.0.4) and maps the driver tuple to the minimum CUDA major it can host: * driver >= 525.60.13 -> ‘12’ (CUDA 12+) * driver < 525.60.13 -> ‘11’ (treated as too old by callers)

Returns:

‘12’ or ‘11’ depending on driver capability. ‘no_nv_driver’ if the NVML library / driver isn’t installed. ‘nv_driver_issue’ for any other NVML error or unparsable version.

schrodinger.autoinstall.infra.read_config_f(cfgfile: str) dict

Reads parameters from a YAML configuration file.

Parameters:

cfgfile – The path to the YAML config file.

Returns:

A dictionary containing the configuration parameters.