Just ask for GPU passthrough
This commit is contained in:
parent
bf54fea9a1
commit
ae23b13301
26
jlmkr.py
26
jlmkr.py
|
@ -720,29 +720,15 @@ def create_jail(jail_name, distro="debian", release="bookworm"):
|
|||
|
||||
gpu_passthrough_intel = 0
|
||||
|
||||
if os.path.exists("/dev/dri"):
|
||||
print("Detected the presence of an intel GPU.\n")
|
||||
if agree("Passthrough the intel GPU?", "n"):
|
||||
gpu_passthrough_intel = 1
|
||||
if agree("Passthrough the intel GPU (if present)?", "n"):
|
||||
gpu_passthrough_intel = 1
|
||||
|
||||
print()
|
||||
|
||||
gpu_passthrough_nvidia = 0
|
||||
|
||||
if (
|
||||
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
|
||||
if agree("Passthrough the nvidia GPU (if present)?", "n"):
|
||||
gpu_passthrough_nvidia = 1
|
||||
|
||||
print(
|
||||
dedent(
|
||||
|
|
Loading…
Reference in New Issue