# \[FFMPEG\] - Cannot load libcuda.so.1 | Hardware encoding in docker on a proxmox vm

**URL:** <https://forums.plex.tv/t/ffmpeg-cannot-load-libcuda-so-1-hardware-encoding-in-docker-on-a-proxmox-vm/936724>\
**Category:** Plex Media Server\
**Tags:** server-linux, server-docker\
**Created:** [February 26, 2026, 8:34pm UTC](https://forums.plex.tv/t/ffmpeg-cannot-load-libcuda-so-1-hardware-encoding-in-docker-on-a-proxmox-vm/936724 "2026-02-26T20:34:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mvarst](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mvarst/32/334395_2.png) [@Mvarst](https://forums.plex.tv/u/Mvarst)\
**Post date:** [February 26, 2026, 8:34pm UTC](https://forums.plex.tv/t/ffmpeg-cannot-load-libcuda-so-1-hardware-encoding-in-docker-on-a-proxmox-vm/936724/1 "2026-02-26T20:34:57Z")

</div>

Server Version#: 1.43.0.10492

This is my setup

1. Computer with GTX 1060
2. Installed on it is Proxmox
3. Proxmox is running a VM (PCIe passthrough seemingly works no errors other than plex)
4. Plex is running in docker on that VM

Here is my plex log file

[Plex Media Server Logs\_2026-02-26\_20-02-45.zip](https://forums.plex.tv/uploads/short-url/eoWlf0BEg7LqRSU6TY4voYwRiiU.zip) (1.3 MB)

I saw `[FFMPEG] - Cannot load libcuda.so.1` in the log and was able to find [this](https://www.reddit.com/r/PleX/comments/11wbn13/plex_nvenc_transcode_proxmox_vm_passthrough_and/) guy on reddit in much the same situation as me, but i was unable to find an answer from that thread.

Here is my compose.yml:

 ![image](https://global.discourse-cdn.com/plex/original/4X/d/6/f/d6fd59d1c93905e310efde1b703a8eafd920f426.png)

I have the latest drivers installed with `sudo ubuntu-drivers autoinstall`  
`nvidia-smi` returns this:

```auto
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.288.01 Driver Version: 535.288.01 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce GTX 1060 6GB Off | 00000000:00:10.0 Off | N/A |
| 0% 31C P8 5W / 156W | 2MiB / 6144MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
+---------------------------------------------------------------------------------------+

```

I know this might not be the right place to ask but i thought somebody might have experience with this exact setup.

---

<div class="post-metadata">

**Author:** ![mdstricklin](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@mdstricklin](https://forums.plex.tv/u/mdstricklin)\
**Post date:** [March 8, 2026, 1:44pm UTC](https://forums.plex.tv/t/ffmpeg-cannot-load-libcuda-so-1-hardware-encoding-in-docker-on-a-proxmox-vm/936724/2 "2026-03-08T13:44:56Z")

</div>

Did you ever resolve this? I’m also getting this error and have made absolutely zero headway towards fixing it.

ERROR - [Req#397/Transcode] [FFMPEG] - Cannot load libcuda.so.1  
ERROR - [Req#397/Transcode] [FFMPEG] - Could not dynamically load CUDA

---

<div class="post-metadata">

**Author:** ![Mvarst](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mvarst/32/334395_2.png) [@Mvarst](https://forums.plex.tv/u/Mvarst)\
**Post date:** [March 9, 2026, 10:49am UTC](https://forums.plex.tv/t/ffmpeg-cannot-load-libcuda-so-1-hardware-encoding-in-docker-on-a-proxmox-vm/936724/3 "2026-03-09T10:49:51Z")

</div>

Yes i did. My issue was that i did not fully understand all the steps needed to get an nvidia gpu to work inside a docker container

Just to repeat my setup:

1. Proxmox on machine with nvidia GPU
2. Ubuntu VM
3. Docker running plex on that VM.

I first thought i had done something wrong in the passthrough of the device to the VM with IOMMU and driver blacklisting and so on, but running `nvidia-smi` worked.  
My issue was with **docker**.

This is my **new compose file** : (some sections may be obsolete, but the moment it started working i stopped changing it)

```auto
services:
  plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    restart: unless-stopped
    networks:
      - default
    runtime: nvidia
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu,video]
    ports:
      - "32400:32400/tcp"
      - "3005:3005/tcp"
      - "8324:8324/tcp"
      - "32469:32469/tcp"
      - "1900:1900/udp"
      - "32410:32410/udp"
      - "32412:32412/udp"
      - "32413:32413/udp"
      - "32414:32414/udp"
    volumes:
      - ./config:/config
      - /data:/data
      - ./transcode:/transcode
    environment:
      TZ: "My_TZ"
      PLEX_CLAIM: "My_Key"
      PLEX_UID: "1000"
      PLEX_GID: "1000"
      NVIDIA_VISIBLE_DEVICES: all
      NVIDIA_DRIVER_CAPABILITIES: compute,video,utility

```

* * *

* * *

I kept getting errors when i included this section, so i just didn’t include it originally.

```auto
    runtime: nvidia
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu,video]

```

**Turns out that section is crucial, you just need the NVIDIA Container Toolkit for it to work.**  
I followed this official [guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) from NVIDIA.

This may not be the solution to your issue, so if you have further trouble go ahead and ask.

---

<div class="post-metadata">

**Author:** ![mdstricklin](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@mdstricklin](https://forums.plex.tv/u/mdstricklin)\
**Post date:** [March 9, 2026, 12:55pm UTC](https://forums.plex.tv/t/ffmpeg-cannot-load-libcuda-so-1-hardware-encoding-in-docker-on-a-proxmox-vm/936724/4 "2026-03-09T12:55:58Z")

</div>

Thanks for replying! My issue turned out to be something different. I was able to resolve it using the workaround highlighted in [this GitHub issue](https://github.com/linuxserver/docker-plex/issues/432#issuecomment-3452927020).

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [June 7, 2026, 12:56pm UTC](https://forums.plex.tv/t/ffmpeg-cannot-load-libcuda-so-1-hardware-encoding-in-docker-on-a-proxmox-vm/936724/5 "2026-06-07T12:56:01Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
