forked from Vanilla-OS/nvidia-image
-
Notifications
You must be signed in to change notification settings - Fork 1
/
recipe.yml
123 lines (111 loc) · 3.75 KB
/
recipe.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Vanilla Desktop Nvidia Proprietary
id: nvidia-proprietary
stages:
- id: build
base: ghcr.io/vanilla-os/desktop:main
singlelayer: false
labels:
maintainer: Vanilla OS Contributors
args:
DEBIAN_FRONTEND: noninteractive
runs:
commands:
- echo 'APT::Install-Recommends "1";' > /etc/apt/apt.conf.d/01norecommends
modules:
- name: init-setup
type: shell
commands:
- lpkg --unlock
- apt-get update
- name: nvidia-official-driver
type: shell
commands:
- curl -fSsL https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/3bf863cc.pub | gpg --dearmor -o /usr/share/keyrings/nvidia-drivers.gpg
- echo 'deb [signed-by=/usr/share/keyrings/nvidia-drivers.gpg] https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/ /' > /etc/apt/sources.list.d/nvidia-drivers.list
- apt-get update
- name: nvidia-official-driver
type: shell
commands:
- apt-mark hold nvidia-driver nvidia-vaapi-driver nvidia-settings nvidia-persistenced nvidia-smi libnvidia-cfg1 libnvidia-glcore libnvidia-glvkspirv libnvidia-gpucomp libnvidia-fbc1 nvidia-container-toolkit
modules:
- name: install-nvidia
type: apt
source:
packages:
- nvidia-driver
- nvidia-vaapi-driver
- nvidia-settings
- nvidia-persistenced
- nvidia-smi
- libnvidia-cfg1
- libnvidia-glcore
- libnvidia-glvkspirv
- libnvidia-gpucomp
- libnvidia-fbc1
- nvidia-container-toolkit
- name: nvidia-sysd-units
type: shell
commands:
- mkdir -p /etc/systemd/system/systemd-suspend.service.wants
- mkdir -p /etc/systemd/system/systemd-hibernate.service.wants
- ln -s /usr/lib/systemd/system/nvidia-suspend.service /etc/systemd/system/systemd-suspend.service.wants/nvidia-suspend.service
- ln -s /usr/lib/systemd/system/nvidia-hibernate.service /etc/systemd/system/systemd-hibernate.service.wants/nvidia-hibernate.service
- ln -s /usr/lib/systemd/system/nvidia-resume.service /etc/systemd/system/systemd-hibernate.service.wants/nvidia-resume.service
- name: extra-utilities
type: apt
source:
packages:
- switcheroo-control
- name: nvidia-ctk-repo
type: shell
commands:
- apt-get install nvidia-container-toolkit -y
- apt-mark hold nvidia-container-toolkit
- name: vanilla-tools
type: shell
source:
type: tar
url: https://github.com/Vanilla-OS/vanilla-tools/releases/download/v1.0.0/vanilla-tools.tar.gz
checksum: 0e1d92d9c9154f9a115e97b40ff692afa52ddd0d9f770a8ec67440bf1a48aa72
commands:
- mkdir -p /usr/bin
- cp /sources/vanilla-tools/vanilla-tools/nrun /usr/bin/nrun
- cp /sources/vanilla-tools/vanilla-tools/prime-switch /usr/bin/prime-switch
- chmod +x /usr/bin/nrun
- chmod +x /usr/bin/prime-switch
- name: enable-wayland
type: shell
commands:
- mkdir -p /etc/udev/rules.d
- ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
- name: deprecation-notice
type: shell
commands:
- chmod +x /usr/bin/fixme
- name: cleanup
type: shell
commands:
- apt autoremove -y
- apt clean
- apt remove -y zutty gnome-shell-extension-prefs
- SUDO_FORCE_REMOVE=yes apt purge -y sudo
- lpkg --lock
- name: fsguard
type: fsguard
CustomFsGuard: false
FsGuardLocation: "/usr/sbin/FsGuard"
GenerateKey: true
FilelistPaths: ["/usr/bin"]
modules:
- name: remove-prev-fsguard
type: shell
commands:
- rm -rf /FsGuard
- rm -f ./minisign.pub ./minisign.key
- chmod +x /usr/sbin/init
- name: cleanup2
type: shell
commands:
- rm -rf /tmp/*
- rm -rf /var/tmp/*
- rm -rf /sources