
Hello,
I'm new to Dolphin, and I'm running GNU/Linux Debian 8 Jessie on my computer, and this post will be also my presentation, so Hello !
This computer is my only workstation, but also my home server, so it runs 24/7. Because of that, I do not have any discrete GPU on this computer because of the electricity build each year
And as it's not only a workstation, but also a personnal server I don't want to move from stable to testing or sid. And dolphin-emu is only available for testing and sid branch of Debian.
I looked for backporting dolphin-emu to stable, but it implies a lot of dependencies, it didn't worth backporting all of these compared to maintain a sid server (wich I did before, it's not as nightmare as we could think, really not).
So this "tutorial" will be only for Intel i915 but it seems easy to adapt to NVidia GPU (didn't found any documentation for ATI sorry; but I didn't looked for
).
Assuming these, I gave a chance to Docker which I use a lot on this machine, but only for "daemon-type" services, it will be the first time I use Docker for GUI application, and **SPOILER ALERT** it works
.
So you can consider a lot of work to improve or debug it, because I'm writing this post just after I got Mario Sunshine works well, so it's beta state
-----------------------------------------------------
First of all, this is the configuration :
Kernel, mesa libs, and Intel i915 module come from backports to support HD530 (Skylake) correctly.
Docker version is :
-----------------------------------------------------
Now, there is the Dockerfile and the command I use to create it (with explanations of courses, it's worthless without them
)
PS: It's not a tuto to use Docker, there is plenty of them on the web, and well written than "this one" (I really can't call it a tutorial), so Docker explanations will be minimalists.
My Dockerfile (file used by Docker to generate our container) :
So, there is some comments on my Dockerfile, but I'll add some more there :
I build my container from a Debian Sid, so I'm relatively up-to-date with libs and such. I though about using an Arch container, but I prefer to stay close to my host system to have more files shared (libraries) and a smaller RAM footprint (I presume).
The part in comment with /Start section/ /end section/ comes from a container I made in parallel to benchmark Docker virtualisation, I added these packages during my tests with Uningine Heaven benchmark, we will talk about this later.
The two VOLUME lines are there to pick theses folder on my host hard drive (and be persistent when I delete my container).
And finally, the two comments line was my first test, but it seems to have a bug (in dolphin ? docker ? me ?) because all of my config files, BUT NOT my GC memory card (
) where not saved in /config but in "/ /config" (with white space !!), did'nt understood, but my workaround works (the first VOLUME line).
And the CMD is the "only" command launched by Docker when this container is run.
Now the two command lines, one for building this Dockerfile and an other (much more interesting) for running it.
The only 2 things I can say are --network="host" means the network of my build will be my host network (and not a bridged one), and the second is the . (the dot) that means I didn't push it (yet ?) to any repository
(but I share my work here, it's not that bad no ?).
And the second one is my "run" command.
To be simplistic, the run command describe how an instance of my image (made by building the Dockerfile) should be launched and work.
Ok... let's start :
And I made this post because I found this, before, it was really slow. I found this when testing my benchmark container.
And finally, about performances, I would to test the performance drop with Docker, and, seriously, there is no perceptible drop !!!
I ran Unigine Heaven on my computer, then I made a container approximatively the same I show you for Dolphin, just removed Dolphin parts, and add Unigine Heaven. And results are so close I think it might be other process interfering (services, servers ?) on my computer, I should run some more test, but really, I don't want to spent time on this, I don't think I will have different results.
![[Image: mini_257442Capturedcrande20170126000814.png]](http://img15.hostingpics.net/thumbs/mini_257442Capturedcrande20170126000814.png)
In conclusion, Docker is made for high speed virtualization and deployment with high level isolation. I just used it to not break my system (by switching to testing), but for deployment, there is some hardware specific parts (libgl's and controller device, but who really wants to automatically deploy Dolphin containers
) and for isolation, I think I share too much devices to really talk about safe isolation
Sorry for my English, but I'm French and hope I didn't make too much language errors.
I'm new to Dolphin, and I'm running GNU/Linux Debian 8 Jessie on my computer, and this post will be also my presentation, so Hello !

This computer is my only workstation, but also my home server, so it runs 24/7. Because of that, I do not have any discrete GPU on this computer because of the electricity build each year

And as it's not only a workstation, but also a personnal server I don't want to move from stable to testing or sid. And dolphin-emu is only available for testing and sid branch of Debian.
I looked for backporting dolphin-emu to stable, but it implies a lot of dependencies, it didn't worth backporting all of these compared to maintain a sid server (wich I did before, it's not as nightmare as we could think, really not).
So this "tutorial" will be only for Intel i915 but it seems easy to adapt to NVidia GPU (didn't found any documentation for ATI sorry; but I didn't looked for

Assuming these, I gave a chance to Docker which I use a lot on this machine, but only for "daemon-type" services, it will be the first time I use Docker for GUI application, and **SPOILER ALERT** it works

So you can consider a lot of work to improve or debug it, because I'm writing this post just after I got Mario Sunshine works well, so it's beta state

-----------------------------------------------------
First of all, this is the configuration :
Code:
Hardware is :
Intel i5 6500
8GB DDR4 RAM
System and Dolphin running on a Samsung 850 EVO SSD
Kernel, mesa libs, and Intel i915 module come from backports to support HD530 (Skylake) correctly.
Code:
Software is :
4.7.0-0.bpo.1-amd64 #1 SMP Debian 4.7.8-1~bpo8+1 (2016-10-19) x86_64 GNU/Linux
libgl1-mesa-dri:
Installé : 12.0.4-2~bpo8+1
Candidat : 12.0.4-2~bpo8+1
Table de version :
13.0.3-1 0
-10 http://ftp.fr.debian.org/debian/ testing/main amd64 Packages
-10 http://ftp.fr.debian.org/debian/ unstable/main amd64 Packages
*** 12.0.4-2~bpo8+1 0
100 http://httpredir.debian.org/debian/ jessie-backports/main amd64 Packages
100 /var/lib/dpkg/status
10.3.2-1+deb8u1 0
990 http://ftp.fr.debian.org/debian/ jessie/main amd64 Packages
libgl1-mesa-glx:
Installé : 10.3.2-1+deb8u1
Candidat : 10.3.2-1+deb8u1
Table de version :
13.0.3-1 0
-10 http://ftp.fr.debian.org/debian/ testing/main amd64 Packages
-10 http://ftp.fr.debian.org/debian/ unstable/main amd64 Packages
12.0.4-2~bpo8+1 0
100 http://httpredir.debian.org/debian/ jessie-backports/main amd64 Packages
*** 10.3.2-1+deb8u1 0
990 http://ftp.fr.debian.org/debian/ jessie/main amd64 Packages
100 /var/lib/dpkg/status
xserver-xorg-video-intel:
Installé : 2:2.99.917+git20161206-1~bpo8+1
Candidat : 2:2.99.917+git20161206-1~bpo8+1
Table de version :
2:2.99.917+git20161206-1 0
-10 http://ftp.fr.debian.org/debian/ testing/main amd64 Packages
-10 http://ftp.fr.debian.org/debian/ unstable/main amd64 Packages
*** 2:2.99.917+git20161206-1~bpo8+1 0
100 http://httpredir.debian.org/debian/ jessie-backports/main amd64 Packages
100 /var/lib/dpkg/status
2:2.21.15-2+b2 0
990 http://ftp.fr.debian.org/debian/ jessie/main amd64 Packages
Docker version is :
Code:
$ docker version
Client:
Version: 1.13.0
API version: 1.25
Go version: go1.7.3
Git commit: 49bf474
Built: Tue Jan 17 09:44:08 2017
OS/Arch: linux/amd64
Server:
Version: 1.13.0
API version: 1.25 (minimum version 1.12)
Go version: go1.7.3
Git commit: 49bf474
Built: Tue Jan 17 09:44:08 2017
OS/Arch: linux/amd64
Experimental: false
-----------------------------------------------------
Now, there is the Dockerfile and the command I use to create it (with explanations of courses, it's worthless without them

PS: It's not a tuto to use Docker, there is plenty of them on the web, and well written than "this one" (I really can't call it a tutorial), so Docker explanations will be minimalists.
My Dockerfile (file used by Docker to generate our container) :
Code:
# Run dolphin in a container
# Base docker image
FROM debian:sid
MAINTAINER Diom
# This is irrelevant now I build it with '--network="host"' option
# echo "nameserver 192.168.0.254\nnameserver 80.67.169.12\nnameserver 80.67.169.40" > /etc/resolv.conf \
# && echo "deb http://ftp.fr.debian.org/debian/ unstable main contrib non-free" > /etc/apt/sources.list \
#Install Dolphin and prerequisites
RUN apt-get update && apt-get install -y \
hicolor-icon-theme \
libgl1-mesa-dri \
libgl1-mesa-glx \
libpulse0 \
libv4l-0 \
fonts-symbola \
# /Start section/ This has been added because needed in my unigine-heaven benchmark test, this doesn't
# takes a lot of disk space, but might be not necessary. TODO : try to remove them one by one and test
libfontconfig1 \
libxrender1 \
libxrandr2 \
libxinerama1 \
libopenal1 \
mesa-utils \
# /End section/
dolphin-emu \
dolphin-emu-data \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /src/*.deb \
&& mkdir -p "/root/.config/dolphin-emu" \
&& mkdir "/roms"
VOLUME /root/.config/dolphin-emu
VOLUME /roms
# ENTRYPOINT ["/usr/games/dolphin-emu"]
# CMD ["-u /config/"]
CMD ["/usr/games/dolphin-emu"]
So, there is some comments on my Dockerfile, but I'll add some more there :
I build my container from a Debian Sid, so I'm relatively up-to-date with libs and such. I though about using an Arch container, but I prefer to stay close to my host system to have more files shared (libraries) and a smaller RAM footprint (I presume).
The part in comment with /Start section/ /end section/ comes from a container I made in parallel to benchmark Docker virtualisation, I added these packages during my tests with Uningine Heaven benchmark, we will talk about this later.
The two VOLUME lines are there to pick theses folder on my host hard drive (and be persistent when I delete my container).
And finally, the two comments line was my first test, but it seems to have a bug (in dolphin ? docker ? me ?) because all of my config files, BUT NOT my GC memory card (

And the CMD is the "only" command launched by Docker when this container is run.
Now the two command lines, one for building this Dockerfile and an other (much more interesting) for running it.
The only 2 things I can say are --network="host" means the network of my build will be my host network (and not a bridged one), and the second is the . (the dot) that means I didn't push it (yet ?) to any repository

Code:
docker build --network="host" -t dolphin-dato .
And the second one is my "run" command.
To be simplistic, the run command describe how an instance of my image (made by building the Dockerfile) should be launched and work.
Code:
docker run -it --net host --memory 2gb -e DISPLAY=unix$DISPLAY -v /media/storage0/ROM/dolphinconfigs:/root/.config/dolphin-emu -v /media/storage0/ROM/:/roms -v /dev/shm:/dev/shm -v /etc/machine-id:/etc/machine-id -v /run/user/$(id -u)/pulse:/run/user/$(id -u)/pulse -v /var/lib/dbus:/var/lib/dbus -v ~/.pulse:/root/.pulse --device /dev/input/event22 --device /dev/dri:/dev/dri --name dolphin-run dolphin-dato
Ok... let's start :
- docker run -it -> means "I want to do this command and directly interact with dolphin (means I wanna play
)
- --net host -> same as above
- --memory 2gb -> means limit the memory to 2GB, not "take them right now" (unlike a classic VM), it's not mandatory but bear in mind I run this on my server, I want to preserve QoS and stability, you could do this to the CPU too, I didn't...
- -e DISPLAY=unix$DISPLAY -> this is to use my host display with docker (means graphical application)
- -v /media/storage0/ROM/dolphinconfigs:/root/.config/dolphin-emu -v /media/storage0/ROM/:/roms -> these are the two folder I want to export from my host into my container
- -v /dev/shm:/dev/shm -v /etc/machine-id:/etc/machine-id -v /run/user/$(id -u)/pulse:/run/user/$(id -u)/pulse -v /var/lib/dbus:/var/lib/dbus -v ~/.pulse:/root/.pulse -> these parameters are there in order to use the pulse-audio from my user session (implies to select pulse audio in dolphin parameters), it's easier with ALSA but we are in 2017 men
- --device /dev/input/event22 -> export my controller (PS4-DualShock 4 plugged by USB, rumble works, analog triggers are not analogs, need to investigate)
- --device /dev/dri:/dev/dri -> really important, this is for sharing the Direct Rendering Infrastructure (graphic hardware acceleration) to the container, works without but only CPU rendering.
- --name dolphin-run -> name of the container (will be started with 'docker start dolphin-run' after)
- dolphin-dato -> this is the name of the image (built above) I use
And I made this post because I found this, before, it was really slow. I found this when testing my benchmark container.
And finally, about performances, I would to test the performance drop with Docker, and, seriously, there is no perceptible drop !!!
I ran Unigine Heaven on my computer, then I made a container approximatively the same I show you for Dolphin, just removed Dolphin parts, and add Unigine Heaven. And results are so close I think it might be other process interfering (services, servers ?) on my computer, I should run some more test, but really, I don't want to spent time on this, I don't think I will have different results.
![[Image: mini_240407Capturedcrande20170126000804.png]](http://img15.hostingpics.net/thumbs/mini_240407Capturedcrande20170126000804.png)
![[Image: mini_257442Capturedcrande20170126000814.png]](http://img15.hostingpics.net/thumbs/mini_257442Capturedcrande20170126000814.png)
In conclusion, Docker is made for high speed virtualization and deployment with high level isolation. I just used it to not break my system (by switching to testing), but for deployment, there is some hardware specific parts (libgl's and controller device, but who really wants to automatically deploy Dolphin containers


Sorry for my English, but I'm French and hope I didn't make too much language errors.