Jump to content

There is a problem with the hardware acceleration of using wsl2 docker


kooapk
Go to solution Solved by Luke,

Recommended Posts

I installed emby in windows wsl2 and docker mode.

My graphics card is nvidia GPX 960

First of all, I installed the special driver that wsl2 can use the gpu

https://developer.nvidia.com/cuda/wsl

nvidia-smi


Wed Mar  1 00:59:12 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.65.01    Driver Version: 516.94       CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| 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 ...  On   | 00000000:2B:00.0  On |                  N/A |
| 36%   32C    P8    14W / 120W |   1623MiB /  2048MiB |      4%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A        21      G   /Xwayland                       N/A      |
+-----------------------------------------------------------------------------+

 

 

docker run -d \
  --name=emby \
  -p 8096:8096 \
  -p 8920:8920 `#optional` \
  -p '1900:1900/udp' \
  -p '7359:7359/udp' \
  -v /root/kooapk/docker/emby/config:/config \
  -v /mnt/wsl/raid5/video:/video \
  -v /opt/vc/lib:/opt/vc/lib `#optional` \
  --device /dev/dri:/dev/dri `#optional` \
  -e PUID=0 \
  -e PGID=0 \
  --mac-address=d8:bb:c1:38:d0:1e \
  -e TZ="Asia/Shanghai" \
  --restart always \
  lscr.io/linuxserver/emby:latest

 

 

image.png.127774213def558c19f6222279652e02.png

Emby did not detect gpu. I need your help. thank you

Link to comment
Share on other sites

kooapk

Thank you for the solution. Since there is a problem with Linux server's emby. Why is it released. So many people still use it

Link to comment
Share on other sites

kooapk

docker run -d \
  --name=emby \
  --network=bridge \
  -p 8096:8096 \
  -p 8920:8920 `#optional` \
  -p '1900:1900/udp' \
  -p '7359:7359/udp' \
  -v /root/kooapk/docker/emby/config:/config \
  -v /mnt/wsl/raid5/video:/video \
  --device /dev/dri:/dev/dri `#optional` \
  --gpus all \
  -e PUID=0 \
  -e PGID=0 \
  -e GIDLIST=0 \
  --mac-address=d8:bb:c1:38:d0:1e \
  -e TZ="Asia/Shanghai" \
  --restart always \
  emby/embyserver:latest

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...