Running podman in Jupyterhub

Hey folks.

I am trying to get podman to run in Jupyterhub. As of writing this message, I am getting the following error when executing podman commands in my Jupyter environment:

jovyan@2692244743ac:~$ sudo podman run <EXAMPLE_IMAGE> WARN[0000] Failed to add conmon to cgroupfs sandbox cgroup: write /sys/fs/cgroup/libpod_parent/conmon/cgroup.procs: write /sys/fs/cgroup/libpod_parent/conmon/cgroup.procs: no such file or directory Error: writing file /sys/fs/cgroup/libpod_parent/libpod-f57d37ef67cf04a15c80e9a0ae0854e75d8f893e90916f69c03dfe0c130d3326/cgroup.procs: No such file or directory: OCI runtime attempted to invoke a command that was not found

I’m new podman and this is becoming quite a headache. Any help is much appreciated.
My goal is to have a daemon-less container runtime environment in JupyterHub with access to my GPUs. I can do this with Docker. My goal is to be deamon-less… hence I want to replace Docker with Podman

We’ll need more information to help you. For example, how have your setup your system, how was Podman installed and configured, what are you trying to run?

Have a read through

Hello @manics

Thank you for reaching out.
I’m running on Ubuntu 24.04 as my host.
I have been using dockerspawner with jupyterhub. I want to use Podman inside the spawned container …. but I don’t want Podman to connect to the system socket (the host’s docker.sock).
Furthermore, I have GPUs on my host system which have been accessible via the spawned containers. I have two general use cases in my Jupyterhub containers:

1- computational jobs using torch
2- multi-container deployments inside the spawned containers..(ala docker and docker compose)

I installed pdoman via apt in the container.

I’d start by working out how to run (nested) Podman in your required configuration inside a container without JupyterHub. Once you’ve worked that out we can convert that configuration into the relevant JupyterHub configuration.

1 Like

Hello again @manics
Thanks for the reply. Would you even recommend this approach? I’m digging through documentation and reading other experiences. It seems achievable; I’m not sure if its the best approach though. May I ask your opinion regarding this approach?
If I were to summarize it, I want to run a rootless container runtime (podman) inside a rootful container envrionment (docker). People have suggested entirely rootless setups; podman inside podman. For the second setup I saw this post “How to run nested, rootless containers?” and have had second thoughts. Any help is much appreciated.
Thanks

Nested podman inside another container engine should be possible, but the operating system needs some configuration to support rootless podman (e.g. cgroups, user/pid/network namespaces, ideally an overlay filesystem) which all needs to be repeated for the nested podman. These will require extra privileges in the parent container (Docker).