Regenerate ld.so.cache

This file is mandatory for programs to know where to look where to find dynamic linked libraries
The problem arise within containers that add .so files to the container during the OCR definition
If we consider nvidia-container-runtim, these .so for example concern cuda libs, nvidia drivers, so that the versions on both the host and
the guest/container are consistent, to avoid version conflict as much as possible, and provide additional tools, like nvidia-smi,
by default)
If ldconfig is not run as a precommand then the latest added libs are not cached
This does not happen with the nvidia-container-runtime because it runs ldconfig
Looks like for some reason the GKE container runtime does not
The provided command should be enough to fix most issues

Signed-off-by: Raphael Glon <oOraph@users.noreply.github.com>
This commit is contained in:
Raphael Glon 2024-04-05 17:56:50 +02:00
parent f9958ee191
commit 4fb19f25be
No known key found for this signature in database
GPG Key ID: 4D4CC6881E12A0C3

View File

@ -1209,6 +1209,16 @@ fn terminate(process_name: &str, mut process: Child, timeout: Duration) -> io::R
}
fn main() -> Result<(), LauncherError> {
match Command::new("ldconfig").spawn() {
Ok(_) => {}
Err(err) => {
tracing::warn!(
"Unable to refresh ldconfig cache. Skipping (useless in most cases). Details {:?}",
err
)
}
}
// Pattern match configuration
let args: Args = Args::parse();