-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker image #87
Comments
Yep, it needs rebuilding w latest version! |
I don't use it myself, so it doesn't get properly tested :S |
I also attempted to build the image using Docker and Podman. No luck either. Something seems wrong because it doesn't contain the proper files (the script directory and dependencies.txt are missing, for example). Running with Podman, a Docker replacement, will require an extra parameter ( To be noted, Docker is sort-of deprecated by Kubernetes in favour of OCI compliant tools, such as Podman and Buildah. |
The good news is that it is finally built properly on podman with all the required files. Unfortunately, Xephyr fails to connect to the display.
I also added Xephyr opens, and InfiniteGlass is engaging. Now getting a whole new set of issues that I hadn't encountered before. Take note that I am running podman instead of docker. The packages are incompatibles and testing on both is troublesome. I gave a few rounds to docker but had no success. Both Arch and Rocky Linux favours podman over docker.
|
$DISPLAY handling correction pushed |
PermissionError: [Errno 13] Permission denied: '/home/glass/.config/glass/ghosts.yml' is really curious to me. This is inside the container, in a path on the container disk, not a mount, so this must be Podmans' doing, as it works under docker for me... As for xhost + you should not need that, if the Xauthority actually parses. I think this is just a follow up error to the assumption that DISPLAY is :0. Try it w my new fix and see if that solves this. IG does not run as root, see the su to user glass here: https://github.com/redhog/InfiniteGlass/blob/master/scripts/docker-runner.sh#L5 Only the shellscript runs as root at first, to be able to get the ip number of the machine and update /etc/hosts |
Curious, indeed! I even attempted to set the volume as
An improvement for sure. You were correct about
This might be so but there are a few conflicting things, such as docker is run with My apologies for giving you such a stress test for InfiniteGlass. I am however willing to test whatever you ask me to. You should perhaps also consider giving a try to Arch Linux on a virtual machine and see if you can get InfiniteGlass working. |
The files in
|
Wait, /home isn't volume / mount? Could you try to run this with docker using the makefile? As in I could pip install in a virtualenv, but this then does not simulate installing globally, as in, how it would have to work if it was your real desktop, and I like the docker image to test this functionality too... |
It is awesome that you test stuff properly. I can try a VM with Arch :) I'd just like for you to run things with docker the exact same way as me once and get that working so we have a baseline to compare to. Then we can see what differs from that... |
Re not as root: Docker does not set the real ip of the container as the ip for the hostname in /etc/hosts but we need that for X to work correctly. So I do: Which requires root. How can you get around that? |
We should consider using
I am using
This is an important question as to what kind of behaviour InfiniteGlass should have on a system installation. We should perhaps consider creating a shell-less (InfiniteGlass) glass user that would host the WM and add every user who has access to it to its group, thus allowing them to start InfiniteGlass in their session. Not anything unheard of, right? Some interesting notes here: Do not run pip as root and pip safe. |
Regarding the installation first: IG should install the same way other desktops or window managers install, that is, so that it is runnable by any user of the system. It should not run with other privileges than that user (having programs running as different users in the same X session is unsafe, and should really only be done if one of the two users is root). The python packages could still be installed in a virtualenv rather than globally, but for a package that itself is installed globally, this is wierd. However, this might be necessary, as not all python deps might exist as debian/rpm/whatever packages (this needs investigating when this is properly packaged). But regardless, they need to be installed so that any user can get to them. That means running pip as root, or changing the owner of the virtualenv after the fact to root. |
|
Re IP: I'm not sure how you could pass it in as an env variable: the ip is assigned by docker when the container is created, so scripts on the host can not know this before starting the container... Sudo is possible, but then does not offer much of a difference from the current setup, except for more complex setup inside the container (sudoers file being correctly set up w/o password), and allowing root escalation (any command can be run as root using sudo at any time; currently, once privileges are dropped using su, there is no way to regain them from inside e.g. a terminal in the IG session). |
The idea is instead to create a group and setting group permission accordingly. A bit like A Virtual Environment will absolutely work as we would hope for: 9:54:52 root@machine Temp python -m pip install --upgrade pip
Requirement already satisfied: pip in /usr/lib/python3.10/site-packages (22.2.1)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
9:55:07 root@machine Temp source bin/activate
(Temp) 9:55:30 root@machine Temp python -m pip install --upgrade pip
Requirement already satisfied: pip in ./lib/python3.10/site-packages (22.0.4)
Collecting pip
Downloading pip-22.2.1-py3-none-any.whl (2.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 11.4 MB/s eta 0:00:00
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 22.0.4
Uninstalling pip-22.0.4:
Successfully uninstalled pip-22.0.4
Successfully installed pip-22.2.1 |
Re dependencies.txt: This is only a temporary measure until I / someone else has made a debian package. The same way, there should be an Arch package. Installing using Makefile directly is bad, but should be used by the build scripts for each distro to make their packages instead... |
Do you have the list of arch packages needed by any chance / have you managed to run it natively / outside docker at all? If so, it would be awesome if you could add a dependencies.arch.txt with them! |
Shall we consider meson? It would allow us to define the dependencies clearly and it would output errors that people could understand in order to search and install the appropriate packages. It's part of the Python ecosystem, so it might be a good thing. |
We also used |
IG already uses pkg-config for the things that it can, see https://github.com/redhog/InfiniteGlass/blob/master/glass-renderer/Makefile#L2 If that integrates with meson then maybe that's a good idea too :) I'll read up on it! |
Just had a look at meson, and here are my conclusions:
|
For now, the references to pkg-config list in the Makefile are enough for me to play around.
What about the other way around? https://mesonbuild.com/Python-module.html
I don't know about SCons but I can see the appeal. We should open an issue and investigate later on. |
Here is a Dockerfile using Arch Linux instead of Ubuntu. This is as minimalistic as possible and yet somewhat reflective of my machine configuration. https://gist.github.com/IanTrudel/21fe4f6f30874f6cf609403ab6909b42 |
https://github.com/redhog/InfiniteGlass/blob/master/scripts/run-in-docker.sh#L30
|
Bugfixed in latest master |
Did you push your commit? The last commit on master was 12 days ago. |
Oups |
The change helps. I could use InfiniteGlass for a session — once — where I could do the things I remember from before. Zooming, moving around, rofi, tiling (worked well!), etc. Any small changes to the build, however, is causing troubles. Even restarting the container is troublesome. We should find a way to ensure compatibility amongst Linux distros. I have ran InfiniteGlass on 3 or 4 distros, so far, plus on macOS and it's been quite difficult despite the modest requirements. We have three methods to run InfiniteGlass and each of them has its own challenges; some distro wouldn't allow one or another.
Let me know how I can assist you in this endeavour. |
I think there are three different problems here:
Some solutions:
|
You can probably help with both Dockerfile and packaging for Arch as that's what you use? I will try to package for Debian & Ubuntu. |
I have modded |
Yes, absolutely. I can prepare a few dockerfiles for Alpine, Arch and possibly a few more. We should also test on those slim/minimal images since they are considerably trimmed down, forcing us to know our dependencies better. We should add support for podman, so it will ensure a proper build. It does override docker and is mostly compatible but running a WM in docker is no small thing. The edit-build-run-debug cycle isn't too friendly right now. I'm not sure that we need distro specific packages as long as anyone could clone this repo and configure and make. (Automake/autoconf?) It suggests that we need to do better for the diagnosis on missing packages, faulty configuration. An AppImage would be helpful though. It usually contains all the dependencies. It could be running Xephyr. A better way to try out InfiniteGlass. Overall, I think this exercise will help InfiniteGlass to be easier to install on any distro, find portability and stability. |
A bit of feedback since your last commit. InfiniteGlass is now starting consistently on docker (your image, not arch). It's however spewing a lot of miscellaneous errors such as |
The Docker image hasn't been updated in two years. See https://hub.docker.com/r/redhogorg/glass/tags.
dockerfiles
directory to hold all the dockerfiles.Links
The text was updated successfully, but these errors were encountered: