Skip to content
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

lxgui docker image? #69

Open
smokhov opened this issue May 13, 2021 · 8 comments
Open

lxgui docker image? #69

smokhov opened this issue May 13, 2021 · 8 comments
Assignees
Milestone

Comments

@smokhov
Copy link

smokhov commented May 13, 2021

Are the plans on making a docker image of lxgui on dockerhub or some such?

Thanks!

@cschreib
Copy link
Owner

Hi! I have planned to release binary packages for Windows once 2.0 finally comes out, but so far I did not consider container images. The main reason is that I am not very familiar with them, so if you know of a good reference, I'd be happy to have a read. My other concern was that that there are quite a few different package systems around (Docker, Flatpak, etc.). I don't know which I should target, whether one is enough, or all of them (I may not have the resources required to maintain it all).

I was planning on releasing binaries for Windows because there are essentially only two targets there: 32 and 64 bits, and building from source on that platform is always more painful. For linux obviously this is more complex, but building from source is super easy, hence my assumption was that people would just build it from source. MacOS is a bit in between, but honestly, given Apple's deprecation of OpenGL, I am not sure it will remain in the list of supported platform for much longer.

@smokhov
Copy link
Author

smokhov commented May 14, 2021

We use Docker and Singularity. Docker seems the most widely used. Singularity can convert Docker containers pretty much on the fly. It should be fairly simply to build a Dockerfile based on your Ubuntu instructions in the README and GitHub actions. From the Dockefile can then build an image that can be published on docker hub. It's basically a script that would being with e.g. FROM ubuntu, etc. then all the updates and all the apt-get commands to get the dependencies.

Windows binaries I am sure can be helpful to some users, e.g., our students to avoid recompiling all the dependencies.
(Windows can also run containers.) MacOS yes indeed now an entirely different story. Not sure where that leads with OpenGL.

@smokhov
Copy link
Author

smokhov commented May 14, 2021

Speaking of sol2... they have a Dockerfile as well: https://github.com/ThePhD/sol2/blob/develop/Dockerfile

@cschreib
Copy link
Owner

Thanks for the pointers. From what I read so far, my understanding is that a docker image is meant to run a specific action on the environment defined by the image. In the case of sol2, they used it to build the library and run tests for the continuous integration for various platforms/compilers and dependency versions.

I'm very new to this, so please bear with me. If I added a docker image to lxgui, what would you expect it to do?

  • Should the entry point be a command that builds the library? Or should the library be built into the image? If it should be built into the image, what would be the entry point?
  • After the library is built, where should the library be installed within the image? System-wide, or in a specific folder? Or not at all?
  • Is the assumption that the lxgui docker image will be composed with other docker images? If so, does that impose some constraints on the parent image that I use? For example, do all other composed images need the same parent distribution? Should I make it configurable somehow?

@smokhov
Copy link
Author

smokhov commented May 17, 2021

For my purposes I would expect the library with all of its dependencies to be available "system wide" that is in proper /include and /lib folders, etc. Like if you were to install it using apt or dnf or brew, just like your dependencies, except that it is pre-compiled on the image instead from the git repo.

As to the ENTRYPOINT it'd be a shell with all the needed environment variables preset by default, such as PATH, LD_LIBRARY_PATH, and anything needed for LXGUI and its dependencies so developers using it can start working with it right away and pulling in their own projects, etc. That was the image can be used also in CI-setups if wanted.

In my case, I envision its use as one of the GUI viewers with OpenISS, so yes, there could be a composition of images.

@cschreib
Copy link
Owner

Thanks, I now have a better understanding of what you are after. If I were to put together such an image and put it on hub.docker.com, would it work for you if I just based it off ubuntu:latest?

@smokhov
Copy link
Author

smokhov commented May 17, 2021

Yes, I think that would work. Thank you!

@cschreib
Copy link
Owner

Ok that sounds easy enough. I will put that on the TODO list for the release. Unless you would be interested in having an image off the master branch? That branch isn't 100% API stable yet, I am waiting for the release to actually freeze the API. But it is 99% of the way there.

@cschreib cschreib self-assigned this May 19, 2021
@cschreib cschreib added this to the v2.0 milestone May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants