From d75cef1eb08e4ebf19a843a9374bbc4f6108d2e4 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 20 Sep 2023 17:57:47 +0100 Subject: [PATCH] docs: improve the notes regarding NVIDIA support --- README.md | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 460caa6..86151dd 100644 --- a/README.md +++ b/README.md @@ -34,26 +34,43 @@ Use [Distrobox](https://distrobox.privatedns.org/) to run [OBS Studio Portable]( distrobox create --image ghcr.io/ublue-os/obs-studio-portable:latest --name obs --pull ``` -If you have an NVIDIA GPU, install the required CUDA and NVENC support in the container. -- The `--nvidia` option, added in Distrobox 1.5.0, does not work on NixOS; so I install the required libraries in the container. +## NVIDIA support + +The appropriate NVIDIA libraries on the host should be automatically be linked inside the container 🪄 +However the capability for Distrobox to automatically connect NVIDIA libraries was recently added in Distrobox 1.5.0, and is also not supported on all distros; NixOS for example. + +Therefore, if your are running an older version of Distrobox or the NVIDIA drivers are not automatically linked inside the container you can install them as follows: - Change the version number (***535** in the example below*) to match the version of the NVIDIA drivers you have installed on the host. +### NVIDIA complete driver stack + +Required if the display is rendered by an NVIDIA GPU. + ```bash -distrobox create --image ghcr.io/ublue-os/obs-studio-portable:latest --name obs --pull --additional-packages "nvidia-headless-no-dkms-535 libnvidia-encode-535" +distrobox create --image ghcr.io/ublue-os/obs-studio-portable:latest --name obs --pull --additional-packages nvidia-driver-535 ``` +### NVIDIA compute only + +Suitable for multi-GPU systems where the NVIDIA GPU is not rendering the display and only being used for compute. + +```bash +distrobox create --image ghcr.io/ublue-os/obs-studio-portable:latest --name obs --pull --additional-packages libnvidia-encode-535 nvidia-headless-no-dkms-535 + 3. Run the initial setup. ```bash -distrobox-enter --name obs -- true +distrobox enter --name obs -- true ``` 4. From now on, launch OBS Studio Portable using the `obs-portable` launcher. ```bash -distrobox-enter --name obs -- /opt/obs-portable/obs-portable +distrobox enter --name obs -- /opt/obs-portable/obs-portable ``` +If the OBS Studio Portable container cannot connect to the host X11 server, add [`xhost +si:localuser:$USER`](https://github.com/89luca89/distrobox/blob/main/docs/compatibility.md#compatibility-notes) to `~/.distroboxrc`. + # More information This container image of OBS Studio Portable is maintained as a collaborative effort between [Universal Blue](https://github.com/ublue-os) and [Martin Wimpress](https://github.com/flexiondotorg), the maintainer of [OBS Studio Portable](https://github.com/wimpysworld/obs-studio-portable), where you can find more information of OBS Studio Portable: