Última actividad 1716098027

We will pass a GPU through to a proxmox container and utilize it for video transcoding.

albert's Avatar albert revisó este gist 1716098027. Ir a la revisión

1 file changed, 2 insertions

tutorial.md

@@ -144,5 +144,7 @@ nvidia-smi
144 144 ```
145 145
146 146 #### Now, your Proxmox container should be set up for GPU passthrough and ready for video transcoding tasks.
147 +
147 148 Source: [LoRes DIY](https://www.youtube.com/@LoResDIY)
149 +
148 150 Video walkthrough: [youtu.be/-Us8KPOhOCY](https://youtu.be/-Us8KPOhOCY)

albert's Avatar albert revisó este gist 1716098011. Ir a la revisión

1 file changed, 2 insertions, 2 deletions

tutorial.md

@@ -144,5 +144,5 @@ nvidia-smi
144 144 ```
145 145
146 146 #### Now, your Proxmox container should be set up for GPU passthrough and ready for video transcoding tasks.
147 - ##### Source: [LoRes DIY](https://www.youtube.com/@LoResDIY)
148 - ##### Video walkthrough: [youtu.be/-Us8KPOhOCY](https://youtu.be/-Us8KPOhOCY)
147 + Source: [LoRes DIY](https://www.youtube.com/@LoResDIY)
148 + Video walkthrough: [youtu.be/-Us8KPOhOCY](https://youtu.be/-Us8KPOhOCY)

albert's Avatar albert revisó este gist 1716097993. Ir a la revisión

1 file changed, 2 insertions, 1 deletion

tutorial.md

@@ -144,4 +144,5 @@ nvidia-smi
144 144 ```
145 145
146 146 #### Now, your Proxmox container should be set up for GPU passthrough and ready for video transcoding tasks.
147 - ##### Source: LoRes DIY [youtu.be/-Us8KPOhOCY](https://youtu.be/-Us8KPOhOCY)
147 + ##### Source: [LoRes DIY](https://www.youtube.com/@LoResDIY)
148 + ##### Video walkthrough: [youtu.be/-Us8KPOhOCY](https://youtu.be/-Us8KPOhOCY)

albert's Avatar albert revisó este gist 1716097950. Ir a la revisión

1 file changed, 2 insertions, 1 deletion

tutorial.md

@@ -143,4 +143,5 @@ Verify the setup:
143 143 nvidia-smi
144 144 ```
145 145
146 - #### Now, your Proxmox container should be set up for GPU passthrough and ready for video transcoding tasks.
146 + #### Now, your Proxmox container should be set up for GPU passthrough and ready for video transcoding tasks.
147 + ##### Source: LoRes DIY [youtu.be/-Us8KPOhOCY](https://youtu.be/-Us8KPOhOCY)

albert's Avatar albert revisó este gist 1716097848. Ir a la revisión

Sin cambios

albert's Avatar albert revisó este gist 1716097254. Ir a la revisión

1 file changed, 1 insertion, 1 deletion

tutorial.md

@@ -143,4 +143,4 @@ Verify the setup:
143 143 nvidia-smi
144 144 ```
145 145
146 - Now, your Proxmox container should be set up for GPU passthrough and ready for video transcoding tasks.
146 + #### Now, your Proxmox container should be set up for GPU passthrough and ready for video transcoding tasks.

albert's Avatar albert revisó este gist 1716097235. Ir a la revisión

1 file changed, 2 insertions, 1 deletion

tutorial.md

@@ -140,6 +140,7 @@ reboot
140 140 ```
141 141 Verify the setup:
142 142 ```sh
143 - nvidia-smi```
143 + nvidia-smi
144 + ```
144 145
145 146 Now, your Proxmox container should be set up for GPU passthrough and ready for video transcoding tasks.

albert's Avatar albert revisó este gist 1716097192. Ir a la revisión

1 file changed, 115 insertions, 53 deletions

tutorial.md

@@ -1,56 +1,106 @@
1 - We will pass a GPU through to a proxmox container and utilize it for video transcoding.
1 + # NVIDIA GPU Passthrough for Video Transcoding in LXC (Proxmox)
2 2
3 - In PVE Host shell
3 + ### 1. Check Kernel Version on PVE Host
4 + Open the PVE Host shell and run:
5 + ```sh
6 + uname -r
7 + ```
4 8
5 - `uname -r`
9 + ### 2. Install Headers
10 + Search for the available PVE headers:
11 + ```sh
12 + apt-cache search pve-header
13 + ```
14 + Install the appropriate headers:
15 + ```sh
16 + apt install pve-headers-*.*.*-*-pve
17 + ```
6 18
7 - - Install headers
8 - `apt install pve-headers`
9 - - Blacklist nouveau
10 - `nano /etc/modprobe.d/blacklist.conf`
11 - - Add lines
12 - `blacklist nouveau`
13 - - Update Initramfs
14 - `update-initramfs -u`
15 - - Reboot!
19 + ### 3. Blacklist Nouveau
20 + Edit the blacklist configuration file:
21 + ```sh
22 + nano /etc/modprobe.d/blacklist.conf
23 + ```
24 + Add the following line:
25 + ```
26 + blacklist nouveau
27 + ```
28 + Update the initial RAM filesystem:
29 + ```sh
30 + update-initramfs -u
31 + ```
32 + Reboot the system:
33 + ```sh
34 + reboot
35 + ```
16 36
17 - - Install dependencies
18 - `apt install build-essential`
19 - - Download driver [https://www.nvidia.com/Download/index.aspx?lang=en-us](https://www.nvidia.com/Download/index.aspx?lang=en-us)
20 - `wget {YOUR-DRIVER-URL)`
21 - - Make the driver file executable
22 - `chmod +x {YOUR-DRIVER-FILE}`
23 - - Install the driver
24 - `./{YOUR-DRIVER-FILE}`
25 - - Make sure the driver loads when restarted
26 - `nano /etc/modules-load.d/modules.conf`
27 - - Add lines
37 + ### 4. Install Dependencies
38 + Install build essentials:
39 + ```sh
40 + apt install build-essential
41 + ```
42 +
43 + ### 5. Download and Install Nvidia Drivers
44 + Download the Nvidia drivers from [nvidia.com/Download/index.aspx](https://www.nvidia.com/Download/index.aspx):
45 + ```sh
46 + wget (YOUR_DRIVER_URL)
47 + ```
48 + Make the driver file executable:
49 + ```sh
50 + chmod +x (YOUR_DRIVER_FILE).run
51 + ```
52 + Install the drivers:
53 + ```sh
54 + ./(YOUR_DRIVER_FILE).run
55 + ```
56 +
57 + ### 6. Ensure Drivers Load on Restart
58 + Edit the modules load configuration:
59 + ```sh
60 + nano /etc/modules-load.d/modules.conf
61 + ```
62 + Add the following lines:
28 63 ```
64 + # Nvidia modules
29 65 nvidia
30 66 nvidia-modeset
31 67 nvidia_uvm
32 68 ```
33 - - Update Initramfs
34 - `update-initramfs -u`
35 - - Create udev rules
36 - `nano /etc/udev/rules.d/70-nvidia.rules`
37 - - Add lines
69 + Update the initial RAM filesystem:
70 + ```sh
71 + update-initramfs -u
72 + ```
73 +
74 + ### 7. Create Udev Rules
75 + Create a new udev rules file:
76 + ```sh
77 + nano /etc/udev/rules.d/70-nvidia.rules
78 + ```
79 + Add the following lines:
38 80 ```
39 81 KERNEL=="nvidia", RUN+="/bin/bash -c '/usr/bin/nvidia-smi -L && /bin/chmod 666 /dev/nvidia*'"
40 82 KERNEL=="nvidia_modeset", RUN+="/bin/bash -c '/usr/bin/nvidia-modprobe -c0 -m && /bin/chmod 666 /dev/nvidia-modeset*'"
41 83 KERNEL=="nvidia_uvm", RUN+="/bin/bash -c '/usr/bin/nvidia-modprobe -c0 -u && /bin/chmod 666 /dev/nvidia-uvm*'"
42 84 ```
43 - - Reboot!
85 + Reboot the system:
86 + ```sh
87 + reboot
88 + ```
44 89
45 - - Check if the driver is running
46 - `nvidia-smi`
47 - - Edit the container conf you want to passthrough to
48 - `nano /etc/pve/lxc/{YOUR-LXC-ID}.conf`
49 - - Note the output of this
50 - `ls -l /dev/nv*`
51 - - Add these lines but make sure the path (numbers) are correct
52 - ```
53 - #Allow cgroup access
90 + ### 8. Verify Driver Installation
91 + Check that the drivers are running:
92 + ```sh
93 + nvidia-smi
94 + ```
95 +
96 + ### 9. Edit Container Configuration for GPU Passthrough
97 + Edit the configuration file of the container:
98 + ```sh
99 + nano /etc/pve/lxc/(YOUR_CONTAINER_ID).conf
100 + ```
101 + Add the following lines, ensuring the paths (numbers) are correct:
102 + ```
103 + # Allow cgroup access
54 104 lxc.cgroup2.devices.allow = c 195:0 rw
55 105 lxc.cgroup2.devices.allow = c 195:255 rw
56 106 lxc.cgroup2.devices.allow = c 195:254 rw
@@ -58,7 +108,7 @@ lxc.cgroup2.devices.allow = c 509:0 rw
58 108 lxc.cgroup2.devices.allow = c 509:1 rw
59 109 lxc.cgroup2.devices.allow = c 10:144 rw
60 110
61 - #Pass through device files
111 + # Pass through device files
62 112 lxc.mount.entry = /dev/nvidia0 dev/nvidia0 none bind,optional,create=file
63 113 lxc.mount.entry = /dev/nvidiactl dev/nvidiactl none bind,optional,create=file
64 114 lxc.mount.entry = /dev/nvidia-modeset dev/nvidia-modeset none bind,optional,create=file
@@ -66,18 +116,30 @@ lxc.mount.entry = /dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file
66 116 lxc.mount.entry = /dev/nvidia-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file
67 117 lxc.mount.entry = /dev/nvram dev/nvram none bind,optional,create=file
68 118 ```
69 - - Start the container
70 - - In LXC shell
71 - `apt update && apt upgrade -y`
72 - - Download driver (https://www.nvidia.com/Download/index.aspx?lang=en-us)
73 - `wget {YOUR-DRIVER-URL)`
74 - - Make the driver file executable
75 - `chmod +x {YOUR-DRIVER-FILE}`
76 - - Install the driver
77 - `./{YOUR-DRIVER-FILE} --no-kernel-module`
78 - - Reboot!
79 - - See if the driver is working
80 - `nvidia-smi`
81 - ## Now you can install Jellyfin and use your nVidia GPU for transcoding.
82 119
83 - Video tutorial: [https://www.youtube.com/watch?v=-Us8KPOhOCY](https://www.youtube.com/watch?v=-Us8KPOhOCY)
120 + ### 10. Set Up GPU in the Container
121 + Start the container and update:
122 + ```sh
123 + apt update && apt upgrade -y
124 + ```
125 + Download the Nvidia drivers inside the container:
126 + ```sh
127 + wget (YOUR_DRIVER_URL)
128 + ```
129 + Make the driver file executable:
130 + ```sh
131 + chmod +x (YOUR_DRIVER_FILE).run
132 + ```
133 + Run the driver file without the kernel module:
134 + ```sh
135 + ./(YOUR_DRIVER_FILE).run --no-kernel-module
136 + ```
137 + Reboot the container:
138 + ```sh
139 + reboot
140 + ```
141 + Verify the setup:
142 + ```sh
143 + nvidia-smi```
144 +
145 + Now, your Proxmox container should be set up for GPU passthrough and ready for video transcoding tasks.

albert's Avatar albert revisó este gist 1703420933. Ir a la revisión

1 file changed, 1 insertion, 1 deletion

tutorial.md

@@ -16,7 +16,7 @@ In PVE Host shell
16 16
17 17 - Install dependencies
18 18 `apt install build-essential`
19 - - Download driver (https://www.nvidia.com/Download/index.aspx?lang=en-us)
19 + - Download driver [https://www.nvidia.com/Download/index.aspx?lang=en-us](https://www.nvidia.com/Download/index.aspx?lang=en-us)
20 20 `wget {YOUR-DRIVER-URL)`
21 21 - Make the driver file executable
22 22 `chmod +x {YOUR-DRIVER-FILE}`

albert's Avatar albert revisó este gist 1703420900. Ir a la revisión

1 file changed, 1 insertion, 1 deletion

tutorial.md

@@ -80,4 +80,4 @@ lxc.mount.entry = /dev/nvram dev/nvram none bind,optional,create=file
80 80 `nvidia-smi`
81 81 ## Now you can install Jellyfin and use your nVidia GPU for transcoding.
82 82
83 - Video tutorial: https://www.youtube.com/watch?v=-Us8KPOhOCY
83 + Video tutorial: [https://www.youtube.com/watch?v=-Us8KPOhOCY](https://www.youtube.com/watch?v=-Us8KPOhOCY)
Siguiente Anterior