Skip to content

Research: Containerizing games with docker #1

@voidderef

Description

@voidderef

In GitLab by @icex2 on Apr 24, 2020, 23:28

Summary

Run piu games in docker containers to provide an additional level of abstracting making them more independent of the base system.

Detailed description

I have already done some testing with this but didn't get really far. I installed nvidia-docker and started with an ubuntu 16.04 nvidia opengl docker container as a base: https://hub.docker.com/r/nvidia/opengl
glxgears was running just fine. Mounting the game data of piu zero as a volume to the container, I tried running it but the game fails when opening the display on XOpenDisplay. I played around a bit but the call was always returning NULL even when setting the display explicitly to :0 which was also "bound" to the container using --env="DISPLAY=:0" ($DISPLAY also yielded :0 and my host display was named like that).

Whoever is reading this, feel free to pick this up if you are interested. If you do, I would appreciate if you leave a note in the comments. If you have any new findings or even a proof of concept, I am looking forward to your contribution.

Some references I used in descending order of relevance:


http://wiki.ros.org/docker/Tutorials/Hardware%20Acceleration


https://www.pugetsystems.com/labs/hpc/Docker-and-NVIDIA-docker-on-your-workstation-Using-Graphical-Applications-915/


https://misha.brukman.net/blog/2020/04/running-decade-old-games-in-containers/

Benefits

Naturally, this makes the games more base OS independent benefitting overall compatibility over time. The games can keep on running on "outdated" and isolated containers and pumptools doesn't have to catch up with any/less changes required to make the games run on newer kernels and distros with updated depedencies.

Drawbacks

Maybe performance might be something to consider here regarding latency but that needs to be tested.

Current blockers

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions