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

Distrobox Support #105

Open
jpf91 opened this issue Feb 24, 2025 · 4 comments
Open

Distrobox Support #105

jpf91 opened this issue Feb 24, 2025 · 4 comments
Assignees

Comments

@jpf91
Copy link

jpf91 commented Feb 24, 2025

Hi there,

thanks a lot for maintaining this great project! It is quite annoying to get all the tools of the flows individually, so such an image is much appreciated!

For the "Using a Local X-Server" use case, a lot of the Docker trickery required to forward the X server, to get file permissions right, to get GPU acceleration etc can be handled generically for any container by distrobox. When using it on linux with podman installed, it's probably the easiest way to run GUI apps in docker containers. So I'd prefer to use the distrobox approach and just use the tool installation from the IIC-OSIC-TOOLS container.

It seems like using the devcontainer image might be a perfect fit for this (I assume it requires a similar set up for env variables, running commands at startup etc). But it seems the image is missing right now? (See #104)

I can already successfully create and use the normal image in distrobox:

distrobox create -i docker.io/hpretl/iic-osic-tools:2025.01 chip
Creating 'chip' using image docker.io/hpretl/iic-osic-tools:2025.01	 [ OK ]
Distrobox 'chip' successfully created.
To enter, run:

distrobox enter chip

distrobox enter chip
Starting container...                   	 [ OK ]
Installing basic packages...            	 [ OK ]
Setting up devpts mounts...             	 [ OK ]
Setting up read-only mounts...          	 [ OK ]
Setting up read-write mounts...         	 [ OK ]
Setting up host's sockets integration...	 [ OK ]
Integrating host's themes, icons, fonts...	 [ OK ]
Setting up distrobox profile...         	 [ OK ]
Setting up sudo...                      	 [ OK ]
Setting up user's group list...         	 [ OK ]

Container Setup Complete!
📦[jpfau@chip ~]$

And the I can run the tools just fine:

📦[jpfau@chip ~]$ /foss/tools/klayout/klayout

However, I can't figure out whether I'm expected to source some file for setup: The tools are not in $PATH, the webserver is obviously not running etc. So I wonder: is there some startup script that can be reused here and that sets up the tool environments?

@MrHighVoltage
Copy link
Collaborator

Hi @jpf91 ,

Yes, there is a script that setups the environment after the startup, the env.sh. As you can see, this script basically adds all the tool paths to the environment, sets a few variables for the container etc...

Is that what you where looking for? Although Distrobox seems interesting, we are currently not planning to further support it, as we want to keep the setup as simple and straight forward as possible.

@jpf91
Copy link
Author

jpf91 commented Feb 25, 2025

Yes indeed :-) Thanks for pointing my in the right direction. I was wondering where this file is in the final container. As it's in /headless , I didn't see it. ($HOME is set to that in the Dockerfile, but as distrobox overwrites this variable I never saw it. Should have tested without distrobox first ;-)

Any chance we can install this script into /foss and source it from /etc/bash.bashrc? This should make it work out-of-the-box for distrobox. How do you handle this for VS Code devcontainers? I assume it has an similar issue?

But for now I think this works fine for distrobox:

distrobox create -i docker.io/hpretl/iic-osic-tools:2025.01 chip
distrobox enter chip
source /headless/.bashrc

This seems to be setting up things properly. I'll do some more testing and if you want I can then add a short section to the README describing this. It seems like the image works out of the box, but of course it'd be better if we could get rid of the manual source command.

@MrHighVoltage
Copy link
Collaborator

Perfect! Yes I just confused myself a bit, as the file gets renamed to .bashrc, and I didn't think of it :)

Yes, that would be the ideal case. If we can provide more information for potential users, please open a pull request with your extended documentation.

As this seems to work now, I close this issue for now. Please feel free to reopen anytime, if you find issues.

@hpretl
Copy link
Member

hpretl commented Feb 25, 2025

@MrHighVoltage Should we do this?

Any chance we can install this script into /foss and source it from /etc/bash.bashrc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants