Merge branch 'feature/KASM-2436_gpu_support' into 'develop'

Resolve KASM-2436 "Feature/ gpu support"

Closes KASM-2436

See merge request kasm-technologies/internal/workspaces-images!51
This commit is contained in:
Justin Travis 2022-05-13 20:27:54 +00:00
commit bdb2d6d01e
5 changed files with 14 additions and 6 deletions

View File

@ -53,7 +53,13 @@ cat >/usr/bin/google-chrome <<EOL
#!/usr/bin/env bash
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/google-chrome/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"None"/' ~/.config/google-chrome/Default/Preferences
/opt/google/chrome/google-chrome ${CHROME_ARGS} "\$@"
if [ -f /opt/VirtualGL/bin/vglrun ] && [ ! -z "\${KASM_EGL_CARD}" ] && [ ! -z "\${KASM_RENDERD}" ] && [ -O "\${KASM_RENDERD}" ] && [ -O "\${KASM_EGL_CARD}" ] ; then
echo "Starting Chrome with GPU Acceleration on EGL device \${KASM_EGL_CARD}"
vglrun -d "\${KASM_EGL_CARD}" /opt/google/chrome/google-chrome ${CHROME_ARGS} "\$@"
else
echo "Starting Chrome"
/opt/google/chrome/google-chrome ${CHROME_ARGS} "\$@"
fi
EOL
chmod +x /usr/bin/google-chrome
cp /usr/bin/google-chrome /usr/bin/chrome

View File

@ -71,7 +71,13 @@ cat >/usr/bin/chromium-browser <<EOL
#!/usr/bin/env bash
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"None"/' ~/.config/chromium/Default/Preferences
/usr/bin/chromium-browser-orig ${CHROME_ARGS} "\$@"
if [ -f /opt/VirtualGL/bin/vglrun ] && [ ! -z "\${KASM_EGL_CARD}" ] && [ ! -z "\${KASM_RENDERD}" ] && [ -O "\${KASM_RENDERD}" ] && [ -O "\${KASM_EGL_CARD}" ] ; then
echo "Starting Chrome with GPU Acceleration on EGL device \${KASM_EGL_CARD}"
vglrun -d "\${KASM_EGL_CARD}" /usr/bin/chromium-browser-orig ${CHROME_ARGS} "\$@"
else
echo "Starting Chrome"
/usr/bin/chromium-browser-orig ${CHROME_ARGS} "\$@"
fi
EOL
chmod +x /usr/bin/chromium-browser
cp /usr/bin/chromium-browser /usr/bin/chromium

View File

@ -47,7 +47,6 @@ mkdir -p /usr/local/lib/docker/cli-plugins
curl -L https://github.com/docker/compose/releases/download/v2.0.1/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/lib/docker/cli-plugins/docker-compose
chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
useradd -m -d /home/kasm-user -s /bin/bash kasm-user
echo 'kasm-user:kasm-user' | chpasswd
echo 'kasm-user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers

View File

@ -44,5 +44,3 @@ echo "Installing Docker Compose"
mkdir -p /usr/local/lib/docker/cli-plugins
curl -L https://github.com/docker/compose/releases/download/v2.0.1/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/lib/docker/cli-plugins/docker-compose
chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
useradd -m -d /home/kasm-user -s /bin/bash kasm-user

View File

@ -19,7 +19,6 @@ cat kali-config/variant-tracelabs/package-lists/kali.list.chroot | sed '/^#/d' |
sh kali-config/common/hooks/normal/osint-packages.chroot
useradd kasm-user
chown -R 1000:1000 \
/usr/share/phoneinfoga \
/usr/share/Spiderpig \