New containers

This commit is contained in:
maurice
2025-10-28 12:14:28 +01:00
parent f0a71e9d47
commit 2d111c34a7
8 changed files with 100 additions and 5 deletions

View File

@@ -52,6 +52,10 @@ param_args() {
case "$1" in
-gpu) # Enable gpu acceleration.
arg "--device /dev/dri" ;;
-kvm) # Enable KVM
arg "--device /dev/kvm" ;;
-usb) # Enable USB access
arg "--device /dev/bus/usb" ;;
-host-spawn) # Enable spawning host commands from inside the container using host-spawn.
arg "-v /run/user/$UID/bus:/tmp/bus"
arg "-e HOST_HOME=$HOME" # Used to translate paths.
@@ -85,6 +89,10 @@ else
fi
name="${image%:*}"
# check if ENV file is present, if so, source it
env_file="$(dirname "$(realpath "$0")")/containers/$name/env"
[ -f "$env_file" ] && source "${env_file}"
# Get container registry from the DEVC_REGISTRY env
# variable.
if [ -n "${DEVC_REGISTRY:-}" ]; then