Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sunlight / Moonlight support #305

Open
westurner opened this issue Dec 20, 2024 · 5 comments
Open

Sunlight / Moonlight support #305

westurner opened this issue Dec 20, 2024 · 5 comments

Comments

@westurner
Copy link

Sunlight server w/ Moonlight client supports gamestreaming screencasting at HDR 4k 120hz with supported GPUs.

Could sunlight and/or moonlight be used with Kasm instead of VNC?

sunshine server

moonlight server

@westurner
Copy link
Author

Just found this too, which mentions kasm and HTML5 and 60 FPS w/ gstreamer hwenv (nvenc)

selkies-gstreamer

@westurner
Copy link
Author

@ACiDGRiM
Copy link

ACiDGRiM commented Dec 25, 2024

I have been using kasm focal desktop core as the base image for a sunshine gamestreaming container: compose and docker file below. I'm struggling to get controller input to work, yet mouse/kb games are working well, but as long as you have your cuda docker integration setup correctly, you can assign individual GPU's or over subscribe a single GPU.

Unfortunately, the 24.02 nobel kasm desktop flavors change something I have yet to figure out and mouse/kb input do not work. any ideas appreciated to improve the below

FROM  kasmweb/core-ubuntu-noble:1.16.1-rolling-weekly

USER 0

RUN wget wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb; dpkg -i ./cuda-keyring_1.1-1_all.deb
RUN apt-get update;apt-get install -y nvidia-utils-565 libnvidia-encode-565 libnvidia-decode-565 cuda-libraries-12-6 cuda-drivers-565
RUN apt-get update;apt-get install -y innoextract libboost-filesystem1.83 libboost-iostreams1.83 libboost-program-options1.83  libboost-system1.83
RUN apt-get update;apt-get install  -y libzip.* firefox mesa-vulkan-drivers llvm
# libvulkan.* vulkan-tools libgnutls.* libcairo* librsvg.*
RUN apt-get update;apt-get install -y file-roller jstest-gtk
RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test

RUN wget https://repo.steampowered.com/steam/pool/steam/s/steam/steam-launcher_1.0.0.82_amd64.deb
RUN wget https://repo.steampowered.com/steam/pool/steam/s/steam/steam-libs-amd64_1.0.0.82_amd64.deb
RUN wget https://github.com/lutris/lutris/releases/download/v0.5.18/lutris_0.5.18_all.deb
RUN apt-get update;apt-get install -y libc6:amd64 libc6:i386 libegl1:amd64 libegl1:i386 libgbm1:amd64 libgbm1:i386 libgl1-mesa-dri:amd64 libgl1-mesa-dri:i386 libglib2.0:amd64 libgamemodeauto*:amd64 libgamemode*:amd64 ./steam-launcher_1.0.0.82_amd64.deb ./steam-libs-amd64_1.0.0.82_amd64.deb ./lutris_0.5.18_all.deb 
RUN wget https://github.com/LizardByte/Sunshine/releases/download/v0.23.1/sunshine-ubuntu-24.04-amd64.deb
RUN dpkg --unpack sunshine*.deb;rm -f /var/lib/dpkg/info/sunshine*.postinst;dpkg configure sunshine-ubuntu-24.04-amd64;apt-get install -yf


#RUN apt-get install -y  ./sunshine-*.deb
RUN git clone https://github.com/lutris/lutris.git /opt/lutris
RUN apt-get update;apt-get install -y steam-libs-amd64 steam-libs-i386 g++-11

#RUN apt-get update;apt-get upgrade -y
USER 1000

services:
desktop1:
#image: kasmweb/core-cuda-focal:1.15.0-rolling
image: 127.0.0.1:5000/gamestreaming:latest
environment:
- NVIDIA_VISIBLE_DEVICES=0
- NVIDIA_DRIVER_CAPABILITIES=all
- VNC_PW=gameadmin
ports:
- 6980:6901
- 47980:47980/tcp
- 47985:47985/tcp
- 48006:48006/tcp
- 55410:55410/udp
- 55411:55411/udp
- 47994:47994/udp
- 47995:47995/udp
- 47996:47996/udp
- 55410:55410/udp
- 55435:55435/tcp
- 55435:55435/udp
privileged: true
volumes:
- /dev/uinput:/dev/uinput
- /dev/uhid:/dev/uhid
- /dev/input:/dev/input
- /volumes/gamestreaming/persistent/desktop1:/home/kasm-user
- /volumes/gamestreaming/persistent/common:/games
device_cgroup_rules:
- 'c 13:* rmw'
- 'c 10:* rmw'
restart: always
desktop2:
#image: kasmweb/core-cuda-focal:1.15.0-rolling
image: 127.0.0.1:5000/gamestreaming:latest
environment:
- NVIDIA_VISIBLE_DEVICES=1
- NVIDIA_DRIVER_CAPABILITIES=all
- VNC_PW=gameadmin
ports:
- 6981:6901
- 47970:47970/tcp
- 47965:47965/tcp
- 47991:47991/tcp
- 55420:55420/udp
- 47979:47979/udp
- 47980:47980/udp
- 47981:47981/udp
- 55415:55415/udp
- 55436:55436/tcp
- 55436:55436/udp
volumes:
- /dev/uinput:/dev/uinput
- /dev/uhid:/dev/uhid
- /dev/input:/dev/input
- /volumes/gamestreaming/persistent/desktop2:/home/kasm-user
- /volumes/gamestreaming/persistent/common:/games
#privileged: true
device_cgroup_rules:
- 'c 13:* rmw'
- 'c 10:* rmw'
restart: always

@mmcclaskey
Copy link
Collaborator

@westurner , we are working on several thinks in the background that will help KasmVNC compete with other solutions like those. It will likely be a few releases before we are there, but you should see things rolling out with each new release.

@westurner
Copy link
Author

westurner commented Jan 19, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants