From e96a803dd0e833670dc5798f850bcee16eb832b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Niederpr=C3=BCm?= Date: Fri, 5 Dec 2025 11:02:13 +0100 Subject: [PATCH] Docker: Use `site.addsitedir` to append to path this allows to properly have packages installed in the custom directory. Then one can even use pip to install packages like `pip install --target ` --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 10408d2..685b0f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,4 +10,4 @@ COPY . heros # Install HEROS in editable mode RUN pip install --break-system-packages -e heros/ && \ - mkdir /git/custom && echo 'import sys\nsys.path.insert(0, "/git/custom")' > /usr/local/lib/`ls /usr/local/lib | grep -P ^python3\.[[:digit:]]+$`/site-packages/sitecustomize.py + mkdir /git/custom && echo 'import site\nsite.addsitedir("/git/custom")' > /usr/local/lib/`ls /usr/local/lib | grep -P ^python3\.[[:digit:]]+$`/site-packages/sitecustomize.py -- GitLab