mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
✨ feat(server): Add pulseaudio to capture sound (#10)
## Description **What(what issue does this code solve/what feature does it add):** We do not have a way to capture sound inside the container. **How(how does it solve it):** 1. Install pulseaudio inside the container 2. Add an entrypoint.sh where we start the pulseaudio ## Required Checklist: - [ ] I have added any necessary documentation and comments in my code (where appropriate) - [ ] I have added tests to make sure my code runs in all contexts ## Further comments
This commit is contained in:
4
.scripts/entrypoint.sh
Normal file
4
.scripts/entrypoint.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
#Start pulseaudio
|
||||
/usr/bin/pulseaudio --system --verbose --log-target=stderr --realtime=true --disallow-exit -F /etc/pulse/default.pa
|
||||
48
.scripts/gpu
48
.scripts/gpu
@@ -1,48 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Version 0.0.1
|
||||
|
||||
#TODO: install nvidia vulkan drivers, or AMD/Intel Mesa drivers
|
||||
#TODO: install dependencies for gpu-installer
|
||||
|
||||
# https://aur.archlinux.org/packages/gpu-screen-recorder-git
|
||||
# https://github.com/lutris/docs/blob/master/InstallingDrivers.md#amd--intel
|
||||
# https://github.com/lutris/docs/blob/master/InstallingDrivers.md#nvidia
|
||||
|
||||
# https://discourse.ubuntu.com/t/enabling-gpu-acceleration-on-ubuntu-on-wsl2-with-the-nvidia-cuda-platform/26604
|
||||
|
||||
xarg="$1"
|
||||
|
||||
xnstll() {
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root or via sudo!"
|
||||
exit 1
|
||||
else
|
||||
add-apt-repository ppa:graphics-drivers/ppa
|
||||
dpkg --add-architecture i386
|
||||
apt update -y
|
||||
apt upgrade -y
|
||||
apt install -y nvidia-driver-535 libvulkan1 libvulkan1:i386
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
fi
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo -e "\n$(basename $0): ERROR - $*" 1>&2
|
||||
echo -e "\nusage: $(basename $0)\n [-c,--configure] \n \n (configure) install dependencies and configure your GPU \n \n" 1>&2
|
||||
}
|
||||
|
||||
if [[ $# -lt 1 ]]; then
|
||||
usage "one option required!"
|
||||
else
|
||||
case $xarg in
|
||||
-c | --configure)
|
||||
# install wine
|
||||
xnstll
|
||||
;;
|
||||
-* | \* | *)
|
||||
# do_usage
|
||||
usage "invalid option $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
Reference in New Issue
Block a user