Skip to main content

normalize_mlstack_env

Function normalize_mlstack_env 

Source
pub fn normalize_mlstack_env(
    user_home: &Path,
    python_bin: &str,
    rocm_path: &Path,
) -> Result<EnvUpdateResult>
Expand description

Normalize the .mlstack_env file in the user’s home directory.

Ensures that the file contains all required environment variables with correct values. The operation is idempotent: running it twice produces the same result as running it once.

Required variables set by this function:

  • MLSTACK_PYTHON_BIN — path to the resolved Python binary
  • ROCM_PATH — path to ROCm installation
  • PYTHONPATH — includes ROCm lib directory
  • PATH — includes ROCm bin directories
  • LD_LIBRARY_PATH — includes ROCm lib directories