Just ask for GPU passthrough
This commit is contained in:
parent
bf54fea9a1
commit
ae23b13301
22
jlmkr.py
22
jlmkr.py
|
@ -720,28 +720,14 @@ def create_jail(jail_name, distro="debian", release="bookworm"):
|
||||||
|
|
||||||
gpu_passthrough_intel = 0
|
gpu_passthrough_intel = 0
|
||||||
|
|
||||||
if os.path.exists("/dev/dri"):
|
if agree("Passthrough the intel GPU (if present)?", "n"):
|
||||||
print("Detected the presence of an intel GPU.\n")
|
|
||||||
if agree("Passthrough the intel GPU?", "n"):
|
|
||||||
gpu_passthrough_intel = 1
|
gpu_passthrough_intel = 1
|
||||||
|
|
||||||
|
print()
|
||||||
|
|
||||||
gpu_passthrough_nvidia = 0
|
gpu_passthrough_nvidia = 0
|
||||||
|
|
||||||
if (
|
if agree("Passthrough the nvidia GPU (if present)?", "n"):
|
||||||
subprocess.run(
|
|
||||||
["modprobe", "nvidia-current-uvm"],
|
|
||||||
stdout=subprocess.DEVNULL,
|
|
||||||
stderr=subprocess.DEVNULL,
|
|
||||||
).returncode
|
|
||||||
== 0
|
|
||||||
):
|
|
||||||
nvidia_detected = True
|
|
||||||
else:
|
|
||||||
nvidia_detected = False
|
|
||||||
|
|
||||||
if nvidia_detected:
|
|
||||||
print("Detected the presence of an nvidia GPU.\n")
|
|
||||||
if agree("Passthrough the nvidia GPU?", "n"):
|
|
||||||
gpu_passthrough_nvidia = 1
|
gpu_passthrough_nvidia = 1
|
||||||
|
|
||||||
print(
|
print(
|
||||||
|
|
Loading…
Reference in New Issue