Closed anderbak closed 1 year ago
Should be possible imo.
Biggest issue is probably getting Zwift to run in a xvfb env. If you can get that to work, then it should not be any issue getting it to work with docker as well.
You could probably test this out with a docker image that hosts a x11 env + vnc or rdp. And then install Zwift using my script on top of this.
Glhf.
I'm looking into a Steam-Headless container right now (https://github.com/Josh5/docker-steam-headless). Will report back.
*Edit: This may be a better place to start https://github.com/solarkennedy/wine-x11-novnc-docker
Just thought I'd jump in here and say great job on this container. I really appreciate the work.
I was able to come back to this after being off the bike for a while, but I got it working with the previously mentioned Steam-Headless and I thought I'd share the setup in case anyone wanted to replicate it.
I'm on unRAID 6.11.5 with an NVIDIA RTX 2080 using 530.41.03. I have a few NVIDIA Shield devices around the house, both Pro and TV versions connected over gigabit ethernet and Steam Link installed at each.
I ended up using the Steam-Headless container since it's intended to stream over Steam Link. Here's the Docker Run command I used for that container:
/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker create --name='Steam-Headless' --net='host' --cpuset-cpus='0,1,2,3,4,8,9,10,11,12' --privileged=true -e TZ="America/New_York" -e HOST_OS="Unraid" -e HOST_HOSTNAME="anderBAKE" -e HOST_CONTAINERNAME="Steam-Headless" -e 'USER_PASSWORD'='password' -e 'TZ'='America/New_York' -e 'USER_LOCALES'='en_US.UTF-8 UTF-8' -e 'NVIDIA_PATCH_VERSION'='' -e 'WEB_UI_MODE'='vnc' -e 'NVIDIA_VISIBLE_DEVICES'='all' -e 'NVIDIA_DRIVER_CAPABILITIES'='all' -e 'DISPLAY'=':55' -e 'MODE'='primary' -e 'PORT_NOVNC_WEB'='8083' -e 'ENABLE_VNC_AUDIO'='false' -e 'ENABLE_EVDEV_INPUTS'='false' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='http://[IP]:[PORT:8083]/' -l net.unraid.docker.icon='https://raw.githubusercontent.com/Josh5/docker-steam-headless/master/images/steam-icon.png' -v '/mnt/user/appdata/steam-headless':'/home/default':'rw' -v '/mnt/user/Games':'/mnt/games':'rw' --dns=192.168.1.1 --runtime=nvidia --hostname='SteamHeadless' --add-host='SteamHeadless:127.0.0.1' --restart='unless-stopped' --shm-size='2G' --ipc='host' -v '/tmp/.X11-unix/':'/tmp/.X11-unix/':'rw' -v '/tmp/pulse/':'/tmp/pulse/':'rw' --ulimit='nofile=1024:524288' --device='/dev/fuse' --device='/dev/uinput' --device-cgroup-rule='c 13:* rmw' --cap-add='NET_ADMIN' --cap-add='SYS_ADMIN' --cap-add='SYS_NICE' --security-opt='seccomp=unconfined' 'josh5/steam-headless:latest'
I'm running this Zwift container with the following run command:
/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker create --name='Zwift' --net='host' --cpuset-cpus='0,1,2,3,4,8,9,10,11,12' --privileged=true -e TZ="America/New_York" -e HOST_OS="Unraid" -e HOST_HOSTNAME="anderBAKE" -e HOST_CONTAINERNAME="Zwift" -e 'DISPLAY'=':55' -e 'NVIDIA_VISIBLE_DEVICES'='all' -e 'NVIDIA_DRIVER_CAPABILITIES'='all' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.icon='https://us.zwift.com/cdn/shop/files/zwf_icon_rgb_og_200x.png?v=1648572513' -v '/tmp/.X11-unix':'/tmp/.X11-unix':'rw' -v '/mnt/user/appdata/Zwift/Game':'/home/user/.wine/drive_c/Program Files (x86)/':'rw' -v '/mnt/user/appdata/Zwift/User':'/home/user/Zwift/':'rw' -v '/tmp/pulse/pulse-socket':'/run/user/1000/pulse/native':'rw' --dns=192.168.1.1 --runtime=nvidia --cpus=9 'netbrain/zwift:latest'
If streaming from a headless server is what you were looking for, I hope this helps!
Interesting setup, i'm guessing the sensor connectivity is still using the bluetooth bridge?
Thank's for this.
I'm personally doing a Sunshine + Moonlight setup for the first time. I haven't tried it yet in complete form but the streaming of Zwift in a virtual output works. It'll probably be BT over to the companion app for the rest, and Zwift streaming to a laptop.
If there's interest I could document the script I made but it's pretty hardcoded for my desktop.
Sure! Should probably have a spot somewhere to share different setups and tweaks. Maybe we should open up the discussions tab in the project page? 🤔
Maybe here?
https://github.com/netbrain/zwift/discussions/categories/show-and-tell
Interesting setup, i'm guessing the sensor connectivity is still using the bluetooth bridge?
Thank's for this.
Yep, still over bridge.
@netbrain I'm thrilled to see that this exists! I haven't been able to use it yet, though since my docker implementation lives on a headless server (no X11) in a closet.
I've looked at your shell script to see if I could glean any kind of information that might lead me to getting this done on my own, but I'm quite frankly out of my depth on that.
What are the odds that your container can run in this type of environment with something like noVNC, Guacamole, or similar making it accessible via web browser (for maximum accessibility)?
Edit I should have mentioned that I understand there would still be a prerequisite for some sort of graphics acceleration, whether it be nvidia, amd, etc. In my case, I'm already sharing an nvidia GPU for acceleration.