You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

182 lines
5.0 KiB

8 years ago
# Steam in Docker
5 years ago
## Changes
5 years ago
### Dec 22 2018:
- support Vulkan;
5 years ago
### Dec 21 2018:
5 years ago
- got rid of 'wrong ELF class' messages in the logs;
5 years ago
- changed the base image ``debian:jessie`` to ``ubuntu:bionic``;
- significantly reduced the amount of dependencies as the image is now using
the Steam runtime;
5 years ago
- added ``SYS_PTRACE`` cap so Proton (modified version of Wine created by Steam) can show additional process traces;
5 years ago
- removed grsecurity support since they have [stopped](https://lwn.net/Articles/720983/) giving us the test patches;
- simplified the ``LD_LIBRARY_PATH`` routine in the launcher;
- users can now control the ``USER_ID`` via the environment variable;
- removed the old drivers support, let me know if you want it back;
8 years ago
## Why?
6 years ago
1. I want to set-up more fences when running the code I cannot always trust nor verify; [issue 3671](https://github.com/valvesoftware/steam-for-linux/issues/3671)
2. I do not want to be spending time figuring out how to install Steam (what deps) in a non-Debian (or non-SteamOS) based distro;
3. I like cleanliness: I can erase Steam and all its dependencies in a matter of seconds by just removing this image;
4. I can have Steam on my Ubuntu/openSUSE/[put any other distro I will want to use] in a short time that Docker takes to download this image;
8 years ago
6 years ago
> Suggestions / PR's are welcome!
8 years ago
8 years ago
## What's tested?
8 years ago
6 years ago
Games:
8 years ago
5 years ago
- Counter-Strike 1.6
8 years ago
- Counter-Strike: Global Offensive
5 years ago
- Call of Duty 4: Modern Warfare
- Delta Force (NovaLogic)
8 years ago
6 years ago
OS:
8 years ago
5 years ago
- Linux: Ubuntu 18.04.1 LTS (64-bit)
8 years ago
6 years ago
HW:
6 years ago
- ASUS P8Z68-V PRO/GEN3
6 years ago
GPU:
- Intel HD Graphics 3000
5 years ago
- NVIDIA's GeForce GTX 1060
> For running games on AMD Radeon please uncomment ``/dev/kfd`` device in the docker-compose.yml file.
8 years ago
## Requirements
- [Docker](https://www.docker.com/)
- [Docker Compose](https://docs.docker.com/compose/) minimum version 1.7.3
8 years ago
# Building and launching Steam
## Launching Steam in Docker
8 years ago
```sh
5 years ago
git clone https://git.nixaid.com/arno/steam.git
cd steam
5 years ago
docker-compose build && docker-compose up
8 years ago
```
6 years ago
If Steam does not start, you may need to allow your user making connections to
your X server:
8 years ago
```sh
8 years ago
xhost +SI:localuser:$(id -un)
```
5 years ago
You can use the following alias:
> add this to your ``~/.bash_alias`` file
```sh
5 years ago
function docker_helper_up() {
5 years ago
command cd ~/git/$1
5 years ago
docker-compose up -d "$1"
5 years ago
command cd ~-
}
function steam() {
5 years ago
docker_helper_up "$FUNCNAME"
5 years ago
}
```
8 years ago
## Troubleshooting
5 years ago
You might want to modify the `docker-compose.yml` in case of problems,
the file should be pretty self explanatory, although you may refer to the official [Docker Compose file reference](https://docs.docker.com/compose/compose-file/)
8 years ago
Also keep in mind to uncomment or/and add your devices to the `devices:` section there.
The best result is when you have a similar to the following output, using the `glxgears` (part of `mesa-utils` package):
If you are getting `segmentation fault` error or Steam does not start, then you could try resetting its config:
```sh
docker-compose run --rm steam --reset
8 years ago
```
5 years ago
## Vulkan / DXVK
5 years ago
DXVK is a Vulkan-based compatibility layer for Direct3D 11.
5 years ago
It allows running 3D applications on Linux using Wine.
To fully leverage the DXVK, you need the following:
1. Vulkan library installed;
2. Capable GPU that supports Vulkan;
3. Latest GPU drivers which support Vulkan;
4. Wine 3.10+ with the [DXVK](https://github.com/doitsujin/dxvk/) (Steam's Proton already has DXVK installed);
5. The game that supports DirectX 11;
```
$ cat /home/user/.local/share/Steam/steamapps/common/Proton\ 3.16/dist/lib64/wine/dxvk/version
60a03a29599bf1f8c73efdbcf288e91ef261bc58 dxvk (v0.90-10-g60a03a2)
```
### Test Vulkan
```
$ docker-compose run --rm --entrypoint bash steam
root@steam:/# id user >/dev/null 2>&1
root@steam:/# [ $? -eq 0 ] || useradd -s /bin/bash -d /home/user -u ${USER_ID:-1000} user
root@steam:/# su -l user
user@steam:~$ LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/hostlibs/32:/hostlibs/64:"
user@steam:~$ LD_LIBRARY_PATH=${LD_LIBRARY_PATH} vulkaninfo | more
user@steam:~$ LD_LIBRARY_PATH=${LD_LIBRARY_PATH} vulkan-smoketest
```
### Test DXVK
First, you need DirectX 10/11 game.
```
$ docker-compose exec steam
$ echo 'user_settings = { "DXVK_HUD": "devinfo,fps", }' > .local/share/Steam/steamapps/common/Proton\ 3.16/user_settings.py
```
After that, launch your game and you should be able to see DXVK HUD in the left upper corner of the screen.
5 years ago
# Links
5 years ago
Below is just a bunch of links, someone might find them useful.
5 years ago
- https://github.com/ValveSoftware/steam-for-linux/issues
5 years ago
- https://github.com/ValveSoftware/Proton/issues
8 years ago
- https://wiki.ubuntu.com/Valve
- https://developer.valvesoftware.com/wiki/Steam_under_Linux#Ubuntu
- http://media.steampowered.com/client/installer/steam.deb
- http://repo.steampowered.com/steam/archive/precise/steam_latest.deb
- http://repo.steamstatic.com/steam/
5 years ago
- https://developer.nvidia.com/vulkan-driver
- https://en.wikipedia.org/wiki/Vulkan_(API)#Compatibility
- https://github.com/lutris/lutris/wiki/How-to:-DXVK
- https://github.com/doitsujin/dxvk/wiki/Driver-support
- https://www.protondb.com
- https://lutris.net