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 duringpynvml
initialization.
- schrodinger.autoinstall.infra.get_major_cuda_version() str ¶
Retrieves the major version of the installed CUDA driver using
pynvml
.- Returns:
The major CUDA driver version as a string (e.g., ‘12’). Returns ‘no_nv_driver’ if
pynvml.NVML_ERROR_LIBRARY_NOT_FOUND
occurs, indicating the NVIDIA driver may not be installed. Returns ‘nv_driver_issue’ for any otherpynvml.NVMLError
.
- 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.