mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-06-28 12:16:53 +00:00
Update configure_igpu_lxc.sh
This commit is contained in:
parent
edd256f3db
commit
2b31f279a8
@ -132,17 +132,34 @@ configure_lxc_for_igpu() {
|
|||||||
# Install iGPU drivers in the container
|
# Install iGPU drivers in the container
|
||||||
install_igpu_in_container() {
|
install_igpu_in_container() {
|
||||||
|
|
||||||
echo -ne "${TAB}${YW}-$(translate 'Installing iGPU drivers inside the container...') ${CL}"
|
msg_info2 "$(translate 'Installing iGPU drivers inside the container...')"
|
||||||
|
tput sc
|
||||||
|
LOG_FILE=$(mktemp)
|
||||||
|
|
||||||
pct start "$CONTAINER_ID"
|
pct start "$CONTAINER_ID"
|
||||||
pct exec "$CONTAINER_ID" -- bash -c "
|
script -q -c "pct exec \"$CONTAINER_ID\" -- bash -c '
|
||||||
set -e
|
set -e
|
||||||
echo '- start install'
|
echo \"- Updating package lists...\"
|
||||||
apt-get update && \
|
apt-get update
|
||||||
apt-get install -y va-driver-all ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && \
|
echo \"- Installing iGPU drivers...\"
|
||||||
chgrp video /dev/dri && chmod 755 /dev/dri && \
|
apt-get install -y va-driver-all ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools
|
||||||
|
chgrp video /dev/dri && chmod 755 /dev/dri
|
||||||
adduser root video && adduser root render
|
adduser root video && adduser root render
|
||||||
"
|
'" "$LOG_FILE"
|
||||||
msg_ok "$(translate 'iGPU drivers installed inside the container.')"
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
tput rc
|
||||||
|
tput ed
|
||||||
|
rm -f "$LOG_FILE"
|
||||||
|
msg_ok "$(translate 'iGPU drivers installed inside the container.')"
|
||||||
|
else
|
||||||
|
tput rc
|
||||||
|
tput ed
|
||||||
|
msg_error "$(translate 'Failed to install iGPU drivers inside the container.')"
|
||||||
|
cat "$LOG_FILE"
|
||||||
|
rm -f "$LOG_FILE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -153,3 +170,4 @@ install_igpu_in_container
|
|||||||
|
|
||||||
|
|
||||||
msg_ok "$(translate 'iGPU configuration completed in container') $CONTAINER_ID."
|
msg_ok "$(translate 'iGPU configuration completed in container') $CONTAINER_ID."
|
||||||
|
sleep 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user