11 lines
585 B
Bash
11 lines
585 B
Bash
#!/bin/sh
|
|
set -eu
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
# Add the Debian components containing the packaged NVIDIA driver and toolkit.
|
|
if ! grep -Eq '^Components: .*non-free([[:space:]]|$)' /etc/apt/sources.list.d/debian.sources; then
|
|
sed -i.rps-original '/^Components: main$/s/$/ contrib non-free non-free-firmware/' /etc/apt/sources.list.d/debian.sources
|
|
fi
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends "linux-headers-$(uname -r)" nvidia-driver nvidia-smi nvidia-cuda-toolkit build-essential cmake libssl-dev nlohmann-json3-dev openssl
|
|
modprobe nvidia
|
|
nvidia-smi -L
|