Installing python, perl, ruby modules in silverblue

Is there a general installation principle here? I’m mainly concerned about perl modules (cpan) and python modules (pip) but also to a lesser extent, ruby gems.

I’m trying to avoid overlaying packages and thus considerably slowing down the ostree update process.

Even more, though, I’m trying to avoid manually running cpan, pip, and gem for hundreds of modules that live in my home directory.

Advice greatly appreciated

Hello @archaic ,
Welcome to :fedora: !

You may want to consider this … A beginner's guide to Python containers | Red Hat Developer . Podman comes pre-installed on Silverblue/Fedora Atomic. For more Podman stuff … Getting Started with Podman | Podman. There is also … https://hub.docker.com/_/perl/ where the official perl dockerhub image is.

I would recommend installing all of those in a toolbox container: Toolbx :: Fedora Docs

Apologies for not being clear. For certain utilities, like shellcheck for example, I create a toolbox and then on the hostI I setup an alias for it in .bashrc like: alias shellcheck toolbox run shellcheck'. It’s not perfect. I am rather fond of distrobox’s export feature. But I’m trying to find ways to not alter the host if at all possible (which means trying to not install distrobox, even).

Is there a way to run the following commands from the host for a module not installed on the host:

python -c 'import <something in a toolbox>'
ruby -e 'require "<something in a toolbox>"'
perl -e 'use <something in a toolbox>'

I don’t really care if I install modules via dnf or cpan/pip/gem I just need them available from the host.

This all naively assumes using toolbox, but that is likely more from my inexperience with rpm-ostree distros. Toolbox is not a hard requirement.

Thanks so much!

You can run a command in a toolbox, from the host, using:

$ toolbox run --container fedora-toolbox-40 python -c 'import ...'

You can install all your modules inside the toolbox and import them there.

Added development, perl, python, rpm-ostree, ruby

Thanks! I will give that a try over the weekend!