I use two Docker with separated GPUs. The GPU Part works so far very good. But the Problem ist Mouse & Keyboard. If i move the Mouse Docker 1 the mouse moves in Docker2 as well. To be honest, i tried different things but in the end, i dont know where to start to debug. Host ist Debian 11 with a nvidia 4070 ti super and 3090
Same with audio. The audio from Docker1 is on Docker2 and visa versa.
Steps to Reproduce
No response
Expected Behavior
Audio from Docker 1 plays in stream of Docker1 and visa versa
Input from Mouse und Keyboard from Docker1 is containerd in Docker1 and visa versa
version: "3.8"
services:
steam-headless:
image: josh5/steam-headless:latest
restart: unless-stopped
shm_size: ${SHM_SIZE}
#privileged: true
ipc: host # Could also be set to 'shareable'
ulimits:
nofile:
soft: 1024
hard: 524288
cap_add:
- NET_ADMIN
- SYS_ADMIN
- SYS_NICE
security_opt:
- seccomp:unconfined
- apparmor:unconfined
# NETWORK:
## NOTE: With this configuration, if we do not use the host network, then physical device input
## is not possible and your USB connected controllers will not work in steam games.
network_mode: host
hostname: ${NAME}
extra_hosts:
- "${NAME}:127.0.0.1"
# ENVIRONMENT:
## Read all config variables from the .env file
environment:
# System
- TZ=${TZ}
- USER_LOCALES=${USER_LOCALES}
- DISPLAY=${DISPLAY}
# User
- PUID=${PUID}
- PGID=${PGID}
- UMASK=${UMASK}
- USER_PASSWORD=${USER_PASSWORD}
# Mode
- MODE=${MODE}
# Web UI
- WEB_UI_MODE=${WEB_UI_MODE}
- ENABLE_VNC_AUDIO=${ENABLE_VNC_AUDIO}
- PORT_NOVNC_WEB=${PORT_NOVNC_WEB}
- NEKO_NAT1TO1=${NEKO_NAT1TO1}
# Steam
- ENABLE_STEAM=${ENABLE_STEAM}
- STEAM_ARGS=${STEAM_ARGS}
# Sunshine
- ENABLE_SUNSHINE=${ENABLE_SUNSHINE}
- SUNSHINE_USER=${SUNSHINE_USER}
- SUNSHINE_PASS=${SUNSHINE_PASS}
# Xorg
- ENABLE_EVDEV_INPUTS=${ENABLE_EVDEV_INPUTS}
- FORCE_X11_DUMMY_CONFIG=${FORCE_X11_DUMMY_CONFIG}
# Nvidia specific config
- NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES}
- NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES}
- NVIDIA_DRIVER_VERSION=${NVIDIA_DRIVER_VERSION}
runtime: nvidia
# DEVICES:
devices:
# Use the host fuse device [REQUIRED].
- /dev/fuse
# Add the host uinput device [REQUIRED].
- /dev/uinput
# Add NVIDIA HW accelerated devices [OPTIONAL].
# Add NVIDIA HW accelerated devices [OPTIONAL].
# NOTE: If you use the nvidia container toolkit, this is not needed.
# Installing the nvidia container toolkit is the recommended method for running this container
#- /dev/nvidia3
# - /dev/nvidia0
# - /dev/nvidia1
# - /dev/nvidia2
# - /dev/nvidiactl
# - /dev/nvidia-modeset
# - /dev/nvidia-uvm
# - /dev/nvidia-uvm-tools
# - /dev/nvidia-caps/nvidia-cap1
# - /dev/nvidia-caps/nvidia-cap2
# - /dev/dri/
# Ensure container access to devices 13:*
# NOTE: If you use the nvidia container toolkit, this is not needed.
# Installing the nvidia container toolkit is the recommended method for running this container
# GPU PASSTHROUGH
deploy:
resources:
reservations:
# Enable support for NVIDIA GPUs.
#
# Ref: https://docs.docker.com/compose/gpu-support/#enabling-gpu-access-to-service-containers
devices:
- capabilities: [gpu]
device_ids: ["${NVIDIA_VISIBLE_DEVICES}"]
device_cgroup_rules:
- 'c 13:* rmw'
# VOLUMES:
volumes:
# The location of your home directory.
- ${HOME_DIR}/:/home/default/:rw
# The location where all games should be installed.
# This path needs to be set as a library path in Steam after logging in.
# Otherwise, Steam will store games in the home directory above.
- ${GAMES_DIR}/:/mnt/games/:rw
# The Xorg socket.
- ${SHARED_SOCKETS_DIR}/.X11-unix/:/tmp/.X11-unix/:rw
# Pulse audio socket.
- ${SHARED_SOCKETS_DIR}/pulse/:/tmp/pulse/:rw
---
version: "3.8"
services:
steam-headless:
image: josh5/steam-headless:latest
restart: unless-stopped
shm_size: ${SHM_SIZE}
#privileged: true
ipc: host # Could also be set to 'shareable'
ulimits:
nofile:
soft: 1024
hard: 524288
cap_add:
- NET_ADMIN
- SYS_ADMIN
- SYS_NICE
security_opt:
- seccomp:unconfined
- apparmor:unconfined
# NETWORK:
## NOTE: With this configuration, if we do not use the host network, then physical device input
## is not possible and your USB connected controllers will not work in steam games.
network_mode: host
hostname: ${NAME}
extra_hosts:
- "${NAME}:127.0.0.1"
# ENVIRONMENT:
## Read all config variables from the .env file
environment:
# System
- TZ=${TZ}
- USER_LOCALES=${USER_LOCALES}
- DISPLAY=${DISPLAY}
# User
- PUID=${PUID}
- PGID=${PGID}
- UMASK=${UMASK}
- USER_PASSWORD=${USER_PASSWORD}
# Mode
- MODE=${MODE}
# Web UI
- WEB_UI_MODE=${WEB_UI_MODE}
- ENABLE_VNC_AUDIO=${ENABLE_VNC_AUDIO}
- PORT_NOVNC_WEB=${PORT_NOVNC_WEB}
- NEKO_NAT1TO1=${NEKO_NAT1TO1}
# Steam
- ENABLE_STEAM=${ENABLE_STEAM}
- STEAM_ARGS=${STEAM_ARGS}
# Sunshine
- ENABLE_SUNSHINE=${ENABLE_SUNSHINE}
- SUNSHINE_USER=${SUNSHINE_USER}
- SUNSHINE_PASS=${SUNSHINE_PASS}
# Xorg
- ENABLE_EVDEV_INPUTS=${ENABLE_EVDEV_INPUTS}
- FORCE_X11_DUMMY_CONFIG=${FORCE_X11_DUMMY_CONFIG}
# Nvidia specific config
- NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES}
- NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES}
- NVIDIA_DRIVER_VERSION=${NVIDIA_DRIVER_VERSION}
runtime: nvidia
# DEVICES:
devices:
# Use the host fuse device [REQUIRED].
- /dev/fuse
# Add the host uinput device [REQUIRED].
- /dev/uinput
# Add NVIDIA HW accelerated devices [OPTIONAL].
# Add NVIDIA HW accelerated devices [OPTIONAL].
# NOTE: If you use the nvidia container toolkit, this is not needed.
# Installing the nvidia container toolkit is the recommended method for running this container
#- /dev/nvidia3
# - /dev/nvidia0
# - /dev/nvidia1
# - /dev/nvidia2
# - /dev/nvidiactl
# - /dev/nvidia-modeset
# - /dev/nvidia-uvm
# - /dev/nvidia-uvm-tools
# - /dev/nvidia-caps/nvidia-cap1
# - /dev/nvidia-caps/nvidia-cap2
# - /dev/dri/
# Ensure container access to devices 13:*
# NOTE: If you use the nvidia container toolkit, this is not needed.
# Installing the nvidia container toolkit is the recommended method for running this container
# GPU PASSTHROUGH
deploy:
resources:
reservations:
# Enable support for NVIDIA GPUs.
#
# Ref: https://docs.docker.com/compose/gpu-support/#enabling-gpu-access-to-service-containers
devices:
- capabilities: [gpu]
device_ids: ["${NVIDIA_VISIBLE_DEVICES}"]
device_cgroup_rules:
- 'c 13:* rmw'
# VOLUMES:
volumes:
# The location of your home directory.
- ${HOME_DIR}/:/home/default/:rw
# The location where all games should be installed.
# This path needs to be set as a library path in Steam after logging in.
# Otherwise, Steam will store games in the home directory above.
- ${GAMES_DIR}/:/mnt/games/:rw
# The Xorg socket.
- ${SHARED_SOCKETS_DIR}/.X11-unix/:/tmp/.X11-unix/:rw
# Pulse audio socket.
- ${SHARED_SOCKETS_DIR}/pulse/:/tmp/pulse/:rw
This is an issue with the current implementation of udev inside the container. Something that one day I hope to look at improving.
For now, this is a known limitation.
Describe the Bug
I use two Docker with separated GPUs. The GPU Part works so far very good. But the Problem ist Mouse & Keyboard. If i move the Mouse Docker 1 the mouse moves in Docker2 as well. To be honest, i tried different things but in the end, i dont know where to start to debug. Host ist Debian 11 with a nvidia 4070 ti super and 3090
Same with audio. The audio from Docker1 is on Docker2 and visa versa.
Steps to Reproduce
No response
Expected Behavior
Audio from Docker 1 plays in stream of Docker1 and visa versa
Input from Mouse und Keyboard from Docker1 is containerd in Docker1 and visa versa
Screenshots
No response
Relevant Settings
No response
Version
latest
Platform
xconf.org on the host:
the compose-file Docker1:
the .env file Docker1:
The docker-compose file Docker 2:
.env file Docker2:
Relevant log output
No response