seL4 / seL4-CAmkES-L4v-dockerfiles

Dockerfiles defining the dependencies required to build seL4, CAmkES, and L4v.
12 stars 39 forks source link

update treatment of python in docker #72

Closed lsf37 closed 2 months ago

lsf37 commented 6 months ago

More recent Debian versions (including for python 3.11 in bookworm) prevent you from installing python packages via pip or pip3 system-wide.

The recommendation on the failure message is to use Debian packages or virtual envs. Neither look to me like they make sense for this.

Installing under the default user account is also problematic, because that is root, and the interactive version oft he docker images will be running under a different account, so won't pick up that installation.

One option that could work is to make a virtual env under the root user (because further images, e.g. CI, derived from the base images would expect the packages to be visible by default), and make the host user for the interactive image somehow use that virtual env. Not sure how much work that is.

Does anyone have a better idea?

This all sounds like a whole lot of unnecessary work, because these images are essentially single user systems.

lsf37 commented 4 months ago

Actually, the more I think about it, the more I think we should just use --break-system-packages. The container isn't supposed to run anything else and there are no other installations to conflict with.

We might still want to provide venv setups for specific project/repos, but that's not in the docker containers.

So unless someone is coming in with a different opinion, I'll close this issue in a week or so.