mirror of
https://github.com/JamesTurland/JimsGarage.git
synced 2024-11-25 01:10:22 +00:00
lxc-gpu
This commit is contained in:
parent
7dab87b7ef
commit
68d60b204c
2 changed files with 80 additions and 0 deletions
25
LXC/Jellyfin/docker-compose.yaml
Normal file
25
LXC/Jellyfin/docker-compose.yaml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
version: "2"
|
||||||
|
services:
|
||||||
|
jellyfin:
|
||||||
|
image: jellyfin/jellyfin
|
||||||
|
container_name: jellyfin
|
||||||
|
group_add:
|
||||||
|
- '107' # This needs to be the group id of running `stat -c '%g' /dev/dri/renderD128` on the docker host
|
||||||
|
environment:
|
||||||
|
- TZ=Europe/London
|
||||||
|
volumes:
|
||||||
|
- ./jellyfin/config:/config
|
||||||
|
- ./jellyfin/cache:/cache
|
||||||
|
- /films:/films
|
||||||
|
# - /home/ubuntu/YOUR_NAS/Films:/Films:ro
|
||||||
|
# - /home/ubuntu/YOUR_NAS/TVShows:/TVShows:ro
|
||||||
|
# - /home/ubuntu/YOUR_NAS/Audiobooks:/Audiobooks:ro
|
||||||
|
# - /home/ubuntu/YOUR_NAS/Music:/Music:ro
|
||||||
|
ports: # You will need to uncomment if you aren't running through a proxy
|
||||||
|
- 8096:8096
|
||||||
|
- 8920:8920 #optional
|
||||||
|
- 7359:7359/udp #optional
|
||||||
|
- 1900:1900/udp #optional
|
||||||
|
devices: # uncomment these and amend if you require GPU accelerated transcoding
|
||||||
|
- /dev/dri/renderD129:/dev/dri/renderD129
|
||||||
|
restart: unless-stopped
|
55
LXC/Jellyfin/readme.md
Normal file
55
LXC/Jellyfin/readme.md
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# Find Device Numbers
|
||||||
|
```
|
||||||
|
ls -l /dev/dri
|
||||||
|
```
|
||||||
|
|
||||||
|
# Find Group Numbers
|
||||||
|
```
|
||||||
|
cat /etc/group
|
||||||
|
```
|
||||||
|
|
||||||
|
# Add Group Numbers Values to subguid
|
||||||
|
Change values to map the to above ^^
|
||||||
|
```
|
||||||
|
nano /etc/subguid
|
||||||
|
```
|
||||||
|
Paste at the bottom, for example:
|
||||||
|
```
|
||||||
|
root:44:1
|
||||||
|
root:104:1
|
||||||
|
```
|
||||||
|
|
||||||
|
# Create CT Using Wizard. Edit .conf In /etc/pve/lxc
|
||||||
|
Edit your device IDs and renderD***
|
||||||
|
Ensure you match the idmap values
|
||||||
|
```
|
||||||
|
arch: amd64
|
||||||
|
cores: 2
|
||||||
|
cpulimit: 2
|
||||||
|
features: nesting=1
|
||||||
|
hostname: test-gpu-04
|
||||||
|
memory: 3000
|
||||||
|
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=BC:24:11:06:18:78,ip=dhcp,type=veth
|
||||||
|
ostype: debian
|
||||||
|
rootfs: local-lvm:vm-104-disk-0,size=20G
|
||||||
|
swap: 512
|
||||||
|
unprivileged: 1
|
||||||
|
lxc.cgroup2.devices.allow: c 226:0 rwm
|
||||||
|
lxc.cgroup2.devices.allow: c 226:129 rwm
|
||||||
|
lxc.mount.entry: /dev/dri/renderD129 dev/dri/renderD129 none bind,optional,create=file
|
||||||
|
lxc.idmap: u 0 100000 65536
|
||||||
|
lxc.idmap: g 0 100000 44
|
||||||
|
lxc.idmap: g 44 44 1
|
||||||
|
lxc.idmap: g 45 100045 62
|
||||||
|
lxc.idmap: g 107 104 1
|
||||||
|
lxc.idmap: g 108 100108 65428
|
||||||
|
```
|
||||||
|
|
||||||
|
# Add Root to Groups
|
||||||
|
Do this on your Proxmox Host
|
||||||
|
```
|
||||||
|
usermod -aG render,video root
|
||||||
|
```
|
||||||
|
|
||||||
|
# Whatever You Want...
|
||||||
|
Install Docker, run apps, even change your LXC for a Linux Desktop!!!
|
Loading…
Reference in a new issue