Enhance LLM configuration and installation scripts for improved flexibility
- Added new environment variables in `env.example` and `gpu-rent.vars.example` for fine-tuning LLM settings, including CUDA build options and model version pinning. - Updated `llm.md` documentation to include detailed descriptions of new configuration options and usage cases for LLM setups. - Enhanced the `provision.py` script to forward new environment variables during remote installations, improving the installation process for LLM components. - Modified the `install_llamacpp.sh` script to support conditional CUDA builds and asset URL overrides, ensuring better compatibility with various environments. - Improved logging in the installation scripts to provide clearer feedback during the setup process.
This commit is contained in:
@@ -323,7 +323,9 @@ def run_script_sudo(
|
||||
fh.write(script)
|
||||
sftp.chmod(remote_path, 0o755)
|
||||
sftp.close()
|
||||
env_s = " ".join(f"{key}={value}" for key, value in (env or {}).items())
|
||||
env_s = " ".join(
|
||||
f"{key}={shlex.quote(str(value))}" for key, value in (env or {}).items()
|
||||
)
|
||||
prefix = f"sudo -n env {env_s} " if env_s else "sudo -n "
|
||||
command = f"{prefix}bash {remote_path}"
|
||||
_stdin, stdout, stderr = client.exec_command(command, timeout=timeout, get_pty=True)
|
||||
|
||||
Reference in New Issue
Block a user