![]() |
|
How to make Dolphin works within Docker - Printable Version +- Dolphin, the GameCube and Wii emulator - Forums (https://forums.dolphin-emu.org) +-- Forum: Dolphin Emulator Discussion and Support (https://forums.dolphin-emu.org/Forum-dolphin-emulator-discussion-and-support) +--- Forum: Development Discussion (https://forums.dolphin-emu.org/Forum-development-discussion) +--- Thread: How to make Dolphin works within Docker (/Thread-how-to-make-dolphin-works-within-docker) |
How to make Dolphin works within Docker - Diom - 01-26-2017 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 : Code: Hardware is :Kernel, mesa libs, and Intel i915 module come from backports to support HD530 (Skylake) correctly. Code: Software is :Docker version is : Code: $ docker version----------------------------------------------------- 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 containerSo, 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 ?).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-datoOk... 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. 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. RE: How to make Dolphin works within Docker - Diom - 01-26-2017 [RESERVED] RE: How to make Dolphin works within Docker - MayImilae - 01-26-2017 *waves her magic moderator wand* Moved to Development Discussion! RE: How to make Dolphin works within Docker - emuJay - 07-13-2019 (01-26-2017, 09:50 AM)Diom Wrote: Hello,Hey Diom, have you tried running Dolphin from a Windows Host? I can get it running on a ubuntu container but it crashes whenever I start a game. The error message isn't helpful either: 21:37:043 /build/dolphin-emu-KMFgN1/dolphin-emu-5.0+r1~23~ubuntu16.04.1/Source/Core/Core/ConfigManager.cpp:887 W[BOOT]: GC bootrom file will not be loaded for Wii mode. 21:37:044 /build/dolphin-emu-KMFgN1/dolphin-emu-5.0+r1~23~ubuntu16.04.1/Source/Core/Core/Core.cpp:978 W[COMMON]: Want determinism <- false 21:37:225 /build/dolphin-emu-KMFgN1/dolphin-emu-5.0+r1~23~ubuntu16.04.1/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp:680 N[Wiimote]: WiimoteReal::Shutdown 31:36:865 /build/dolphin-emu-KMFgN1/dolphin-emu-5.0+r1~23~ubuntu16.04.1/Source/Core/Core/ConfigManager.cpp:86 N[BOOT]: Saving settings to /home/tester/.config/dolphin-emu/Dolphin.ini 31:36:127 /build/dolphin-emu-KMFgN1/dolphin-emu-5.0+r1~23~ubuntu16.04.1/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp:680 N[Wiimote]: WiimoteReal::Shutdown Any suggestions would be appreciated! I'm using a pulseaudio client to pipe my sound back to my host RE: How to make Dolphin works within Docker - Shonumi - 07-13-2019 Please try not to necropost. This thread is over 2 years old, and Diom's account is so old and inactive that it's been automatically deactivated. If you're having trouble with Dolphin, it's recommended to make a new thread about it rather than resurrect a fairly forgotten thread such as this. New threads help boost the visibility of your own problem, and people tend to respond more often to them. |