Add docs for setting up Steam Headless on Intel GPU with docker-compose
This commit is contained in:
41
docs/compose-files/.env
Normal file
41
docs/compose-files/.env
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# Docker config
|
||||||
|
## DOCKER_RUNTIME:
|
||||||
|
## Options: ['runc', 'nvidia']
|
||||||
|
## Description: The name of an implementation of OCI Runtime Spec
|
||||||
|
## Available runtimes are listed when you run `docker info`.
|
||||||
|
## Your system may have other options available. As a simple rule, if you are
|
||||||
|
## using an NVIDIA GPU, set this to 'nvidia' for anything else, set this to 'runc'.
|
||||||
|
DOCKER_RUNTIME='runc'
|
||||||
|
|
||||||
|
# Container mode config
|
||||||
|
## MODE:
|
||||||
|
## Options: ['primary', 'secondary']
|
||||||
|
## Description: Steam Headless containers can run in a secondary mode that will only start
|
||||||
|
## a Steam process that will then use the X server of either the host or another
|
||||||
|
## Steam Headless container running in 'primary' mode.
|
||||||
|
MODE='primary'
|
||||||
|
## WEB_UI_MODE:
|
||||||
|
## Options: ['vnc', 'neko', 'none']
|
||||||
|
## Description: Configures the WebUI to use for accessing the virtual desktop.
|
||||||
|
WEB_UI_MODE='vnc'
|
||||||
|
## ENABLE_VNC_AUDIO:
|
||||||
|
## Options: ['true', 'false']
|
||||||
|
## Description: Enables audio over for the VNC Web UI if 'WEB_UI_MODE' is set to 'vnc'.
|
||||||
|
ENABLE_VNC_AUDIO='true'
|
||||||
|
|
||||||
|
# Default user config
|
||||||
|
PUID='1000'
|
||||||
|
PGID='1000'
|
||||||
|
UMASK='000'
|
||||||
|
USER_PASSWORD='password'
|
||||||
|
|
||||||
|
# System config
|
||||||
|
HOSTNAME='SteamHeadless'
|
||||||
|
TZ='Pacific/Auckland'
|
||||||
|
USER_LOCALES='en_US.UTF-8 UTF-8'
|
||||||
|
DISPLAY=':55'
|
||||||
|
SHM_SIZE='2G'
|
||||||
|
|
||||||
|
# Nvidia specific config (not required for non Nvidia GPUs)
|
||||||
|
NVIDIA_DRIVER_CAPABILITIES='all'
|
||||||
|
NVIDIA_VISIBLE_DEVICES='all'
|
||||||
38
docs/compose-files/docker-compose.intel.yml
Normal file
38
docs/compose-files/docker-compose.intel.yml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
services:
|
||||||
|
steam-headless:
|
||||||
|
image: josh5/steam-headless:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
runtime: ${DOCKER_RUNTIME}
|
||||||
|
## NOTE: Requires privileged access to host to be able to access the required devices
|
||||||
|
privileged: true
|
||||||
|
shm_size: ${SHM_SIZE}
|
||||||
|
ipc: host # Could also be set to 'shareable'
|
||||||
|
ulimits:
|
||||||
|
nofile:
|
||||||
|
soft: 1024
|
||||||
|
hard: 524288
|
||||||
|
|
||||||
|
# NETWORK:
|
||||||
|
## NOTE: Steam headless always required the use of the host network
|
||||||
|
network_mode: host
|
||||||
|
hostname: ${HOSTNAME}
|
||||||
|
extra_hosts:
|
||||||
|
- "${HOSTNAME}:127.0.0.1"
|
||||||
|
|
||||||
|
# ENVIRONMENT:
|
||||||
|
## Read all config variables from the .env file
|
||||||
|
env_file: .env
|
||||||
|
|
||||||
|
# VOLUMES:
|
||||||
|
volumes:
|
||||||
|
# The location of your home directory.
|
||||||
|
- /opt/container-data/steam-headless/home/:/home/default/:rw
|
||||||
|
# The location where all games should be installed.
|
||||||
|
- /mnt/Games/:/mnt/games/:rw
|
||||||
|
# Input devices used for mouse and joypad support inside the container.
|
||||||
|
- /dev/input/:/dev/input/:ro
|
||||||
|
# The Xorg socket. This will be shared with other containers so they can access the X server.
|
||||||
|
- /opt/container-data/steam-headless/.X11-unix/:/tmp/.X11-unix/:rw
|
||||||
|
# Pulse audio socket. This will be shared with other containers so they can access the audio sink.
|
||||||
|
- /opt/container-data/steam-headless/pulse/:/tmp/pulse/:rw
|
||||||
48
docs/docker-compose.md
Normal file
48
docs/docker-compose.md
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
# Unraid
|
||||||
|
|
||||||
|
Follow these instructions to configure a docker-compose.yml for your system.
|
||||||
|
|
||||||
|
> __Note__
|
||||||
|
>
|
||||||
|
> These instructions assume that you have docker and docker-compose installed for your system.
|
||||||
|
> Depending on how you have installed this, the commands to execute docker compose may vary.
|
||||||
|
|
||||||
|
|
||||||
|
## PREPARE DIRECTORY:
|
||||||
|
|
||||||
|
> __Note__
|
||||||
|
>
|
||||||
|
> These commands are ment to be run as your user. Do not run them as root. If you do you should manually fix the permissions and ownership after.
|
||||||
|
|
||||||
|
Create a directory for your service:
|
||||||
|
```
|
||||||
|
sudo mkdir -p /opt/container-services/steam-headless
|
||||||
|
sudo chown -R $(id -u):$(id -g) /opt/container-services/steam-headless
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a directory for your service config data:
|
||||||
|
```
|
||||||
|
sudo mkdir -p /opt/container-data/steam-headless/{home,.X11-unix,pulse}
|
||||||
|
sudo chown -R $(id -u):$(id -g) /opt/container-data/steam-headless
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a Steam Headless docker-compose.yml file:
|
||||||
|
```
|
||||||
|
touch /opt/container-services/steam-headless/docker-compose.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
Select from the [COMPOSE FILES](#compose-files) list below the link that best describes your hardware.
|
||||||
|
|
||||||
|
Copy the contents of this file to `/opt/container-services/steam-headless/docker-compose.yml`
|
||||||
|
|
||||||
|
|
||||||
|
## CONFIGURE ENV:
|
||||||
|
|
||||||
|
Create a Steam Headless `/opt/container-services/steam-headless/.env` file with the contents found in this example [Env File](./compose-files/.env).
|
||||||
|
|
||||||
|
Edit these variables as requied.
|
||||||
|
|
||||||
|
|
||||||
|
## COMPOSE FILES:
|
||||||
|
|
||||||
|
- [Intel CPU only](../docker-compose.intel.yml)
|
||||||
20
docs/ubuntu-server.md
Normal file
20
docs/ubuntu-server.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Unraid
|
||||||
|
|
||||||
|
Follow these instructions to install Steam Headless on Ubuntu Server.
|
||||||
|
|
||||||
|
> __Note__
|
||||||
|
>
|
||||||
|
> This assumes that your Ubuntu Server has not be configured to run any desktop environment!
|
||||||
|
|
||||||
|
|
||||||
|
## INSTALL DOCKER:
|
||||||
|
|
||||||
|
Install docker-ce to your Ubuntu server following the [official instrctions](https://docs.docker.com/engine/install/ubuntu/).
|
||||||
|
|
||||||
|
Ensure you install the `docker-compose-plugin` mentioned within these instructions
|
||||||
|
|
||||||
|
|
||||||
|
## CONFIGURE DOCKER COMPOSE:
|
||||||
|
|
||||||
|
Once you have installed docker, follow the [Compose Files](./docker-compose.md) section and select the right configuration file for your hardware.
|
||||||
|
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
# Unraid
|
||||||
|
|
||||||
|
Follow these instructions to install Steam Headless on Unraid
|
||||||
|
|
||||||
## CONTAINER TEMPLATE:
|
## CONTAINER TEMPLATE:
|
||||||
|
|
||||||
1. Navigate to "**APPS**" tab.
|
1. Navigate to "**APPS**" tab.
|
||||||
|
|||||||
@@ -82,13 +82,14 @@ function install_amd_gpu_driver {
|
|||||||
lib32-vulkan-radeon \
|
lib32-vulkan-radeon \
|
||||||
vulkan-icd-loader \
|
vulkan-icd-loader \
|
||||||
vulkan-radeon
|
vulkan-radeon
|
||||||
elif command -v apt-get &> /dev/null; then
|
# There is currently nothing to install inside the debian container. This already comes with the vulken drives that are required
|
||||||
[[ "${APT_UPDATED:-false}" == 'false' ]] && apt-get update && export APT_UPDATED=true
|
# elif command -v apt-get &> /dev/null; then
|
||||||
apt-get install -y \
|
# [[ "${APT_UPDATED:-false}" == 'false' ]] && apt-get update && export APT_UPDATED=true
|
||||||
libvulkan1 \
|
# apt-get install -y \
|
||||||
libvulkan1:i386 \
|
# libvulkan1 \
|
||||||
mesa-vulkan-drivers \
|
# libvulkan1:i386 \
|
||||||
mesa-vulkan-drivers:i386
|
# mesa-vulkan-drivers \
|
||||||
|
# mesa-vulkan-drivers:i386
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,13 +102,14 @@ function install_intel_gpu_driver {
|
|||||||
lib32-vulkan-intel \
|
lib32-vulkan-intel \
|
||||||
vulkan-icd-loader \
|
vulkan-icd-loader \
|
||||||
vulkan-intel
|
vulkan-intel
|
||||||
elif command -v apt-get &> /dev/null; then
|
# There is currently nothing to install inside the debian container. This already comes with the vulken drives that are required
|
||||||
[[ "${APT_UPDATED:-false}" == 'false' ]] && apt-get update && export APT_UPDATED=true
|
# elif command -v apt-get &> /dev/null; then
|
||||||
apt-get install -y \
|
# [[ "${APT_UPDATED:-false}" == 'false' ]] && apt-get update && export APT_UPDATED=true
|
||||||
libvulkan1 \
|
# apt-get install -y \
|
||||||
libvulkan1:i386 \
|
# libvulkan1 \
|
||||||
mesa-vulkan-drivers \
|
# libvulkan1:i386 \
|
||||||
mesa-vulkan-drivers:i386
|
# mesa-vulkan-drivers \
|
||||||
|
# mesa-vulkan-drivers:i386
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user