Skip to content

Commit 14430c4

Browse files
committed
fix: add --break-system-packages for pip installs + pip.conf bypass PEP 668
- Dockerfile: add /etc/pip/pip.conf with break-system-packages=true - run_agent: use --break-system-packages flag when installing requirements.txt - Fixes agent dependency installation on Debian bookworm containers
1 parent bf2ff90 commit 14430c4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
4141
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
4242
ENV PATH="/root/.cargo/bin:${PATH}"
4343

44+
# Allow pip to install packages system-wide (bypass PEP 668)
45+
RUN mkdir -p /etc/pip && printf '[global]\nbreak-system-packages = true\n' > /etc/pip/pip.conf
46+
4447
# Create non-root 'agent' user to run the executor and all agent code.
4548
# Basilica containers have no_new_privs, so sudo is unavailable at runtime.
4649
# All system deps must be pre-installed above (as root during build).

src/executor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ async fn run_agent(
597597
if agent_dir.join("requirements.txt").exists() {
598598
info!("Installing agent requirements.txt");
599599
let (_, stderr, exit) = run_shell(
600-
"pip install -q -r requirements.txt 2>&1 || pip3 install -q -r requirements.txt 2>&1 || true",
600+
"pip install --break-system-packages -q -r requirements.txt 2>&1 || pip3 install --break-system-packages -q -r requirements.txt 2>&1 || true",
601601
&agent_dir,
602602
Duration::from_secs(120),
603603
None,

0 commit comments

Comments
 (0)