mirror of
https://github.com/optim-enterprises-bv/secureblue.git
synced 2025-11-02 19:38:10 +00:00
chore: remove unused ujust commands (#620)
This commit is contained in:
@@ -19,13 +19,6 @@ rpm-ostree kargs \
|
||||
--append-if-missing=initcall_blacklist=simpledrm_platform_driver_init
|
||||
```
|
||||
|
||||
### Nvidia optimus laptop
|
||||
If you are using an nvidia image on an optimus laptop, run this after installation:
|
||||
|
||||
```
|
||||
ujust configure-nvidia-optimus
|
||||
```
|
||||
|
||||
## Enroll secureboot key
|
||||
|
||||
```
|
||||
|
||||
@@ -141,40 +141,3 @@ toolbox-assemble CONTAINER="prompt" ACTION="create" FILE="/etc/toolbox/toolbox.i
|
||||
# Toolboxes are gathered from toolbox.ini, please add them there
|
||||
source /usr/lib/ujust/ujust.sh
|
||||
ToolboxAssembleList {{ FILE }} {{ ACTION }} {{ CONTAINER }}
|
||||
|
||||
alias nvidia := configure-nvidia
|
||||
|
||||
# Configure the Nvidia driver
|
||||
configure-nvidia ACTION="prompt":
|
||||
#!/usr/bin/bash
|
||||
source /usr/lib/ujust/ujust.sh
|
||||
OPTION={{ ACTION }}
|
||||
if [ "$OPTION" == "prompt" ]; then
|
||||
echo "${bold}Configuring Nvidia drivers${normal}"
|
||||
echo 'What would you like to do?'
|
||||
OPTION=$(ugum choose "Set needed kernel arguments" "Test CUDA support")
|
||||
elif [ "$OPTION" == "help" ]; then
|
||||
echo "Usage: ujust configure-nvidia <option>"
|
||||
echo " <option>: Specify the quick option - 'kargs' or 'test-cuda'"
|
||||
echo " Use 'kargs' to Set needed kernel arguments"
|
||||
echo " Use 'test-cuda' to Test CUDA support"
|
||||
exit 0
|
||||
fi
|
||||
if [ "$OPTION" == "Set needed kernel arguments" ] || [ "${OPTION,,}" == "kargs" ]; then
|
||||
if command -v nvidia-smi; then
|
||||
else
|
||||
echo 'You do not appear to be on a Nvidia image, please refer to the README for your uBlue-OS image.'
|
||||
fi
|
||||
elif [ "$OPTION" == "Test CUDA support" ] || [ "${OPTION,,}" == "test-cuda" ]; then
|
||||
if lsmod | grep -wq "nvidia"; then
|
||||
podman run \
|
||||
--user 1000:1000 \
|
||||
--security-opt=no-new-privileges \
|
||||
--cap-drop=ALL \
|
||||
--security-opt label=type:nvidia_container_t \
|
||||
--device=nvidia.com/gpu=all \
|
||||
docker.io/nvidia/samples:vectoradd-cuda11.2.1
|
||||
else
|
||||
echo 'The Nvidia kernel module is not loaded. You may be using secure boot without the needed signing key, lacking the needed kargs, or may not be on a Nvidia image. See "just enroll-secure-boot-key" and "just nvidia-set-kargs".'
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -33,4 +33,4 @@ Rebase to: The equivalent image without `-laptop`. For example, for `kinoite-mai
|
||||
|
||||
Rationale: Upstream recommendations have changed and improvements are being made to PPD. Additionally, nvidia optimus configuration has moved to upstream `just` commands.
|
||||
|
||||
Rebase to: The equivalent image without `-laptop`. For example, for `kinoite-nvidia-laptop-hardened`, rebase to `kinoite-nvidia-hardened` and reboot. Then, run `ujust configure-nvidia-optimus`.
|
||||
Rebase to: The equivalent image without `-laptop`. For example, for `kinoite-nvidia-laptop-hardened`, rebase to `kinoite-nvidia-hardened` and reboot.
|
||||
|
||||
Reference in New Issue
Block a user