From e514af1bae5b1f00f8470f15ffb4415abdd8e323 Mon Sep 17 00:00:00 2001 From: Ayush Ranjan Date: Fri, 1 Nov 2024 10:42:13 -0700 Subject: [PATCH] Add a section on host configurations to the gVisor GPU documentation. Fixes #11098 PiperOrigin-RevId: 692225605 --- g3doc/user_guide/gpu.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/g3doc/user_guide/gpu.md b/g3doc/user_guide/gpu.md index 53a1f007e..186dbd429 100644 --- a/g3doc/user_guide/gpu.md +++ b/g3doc/user_guide/gpu.md @@ -203,7 +203,7 @@ Occasionally, you may also need to dig into the Nvidia GPU Driver itself. To do so, you can install the OSS Driver repo and checkout the appropriate driver version. -``` +```bash DRIVER_VERSION=550.54.15 git clone https://github.com/NVIDIA/open-gpu-kernel-modules.git cd open-gpu-kernel-modules @@ -218,7 +218,7 @@ should be able to see the prints via `dmesg(1)`. Then uninstall the existing Nvidia driver, build kernel module from local source files and reinstall it. -``` +```bash sudo /usr/bin/nvidia-uninstall make modules -j$(nproc) sudo make modules_install -j$(nproc) @@ -231,6 +231,22 @@ sudo insmod kernel-open/nvidia-modeset.ko sudo sh NVIDIA-Linux-x86_64-$DRIVER_VERSION.run --no-kernel-modules ``` +### Host Configurations + + + +When downloading large models within gVisor, you might encounter application +segmentation faults due to host VMA exhaustion. To workaround this, you can set +the value of `/proc/sys/vm/max_map_count` to a large number. + +```bash +echo 1000000 | sudo tee /proc/sys/vm/max_map_count +``` + +Alternatively, you can also just pass the runsc flag `--host-settings=enforce`. + ## Security While CUDA support enables important use cases for gVisor, it is important for