uv is now pre-baked into the base image (agent-runtimes/images/base/Dockerfile) and is faster than pip with better retry on transient network failures. Closes the last runtime hang vector for project-deps install — apt install was removed 2026-09-06 in 0c57972f-pre-bake work but the pip install -e line in init.sh remained. uv pip install is the equivalent operation with the new pre-baked tooling. Refs F-WE-PDIV/RCA-2026-09-04-zombies.
36 lines
1.2 KiB
Bash
Executable File
36 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# Python development capability layer initialization script
|
|
|
|
set -euo pipefail
|
|
|
|
echo "Initializing python-dev capability layer..."
|
|
|
|
# If pyproject.toml exists, install project in development mode
|
|
if [[ -f "/workspace/pyproject.toml" ]]; then
|
|
echo "Found pyproject.toml, installing project in development mode..."
|
|
cd /workspace
|
|
|
|
# Create virtual environment if it doesn't exist
|
|
if [[ ! -d ".venv" ]]; then
|
|
python3 -m venv .venv
|
|
fi
|
|
|
|
# Activate virtual environment
|
|
source .venv/bin/activate
|
|
|
|
# Install project in development mode with all dependencies.
|
|
# Switched from `pip` to `uv pip` 2026-09-09 — uv is now pre-baked into
|
|
# the base image (agent-runtimes/images/base/Dockerfile) and is faster,
|
|
# has better retry on transient network failures, and the only remaining
|
|
# runtime-install hang vector for project deps.
|
|
uv pip install -e ".[dev,test]" 2>/dev/null || uv pip install -e . 2>/dev/null || {
|
|
echo "Could not install with extras, trying basic install..."
|
|
uv pip install -e .
|
|
}
|
|
|
|
echo "Project installed in development mode"
|
|
else
|
|
echo "No pyproject.toml found, skipping project installation"
|
|
fi
|
|
|
|
echo "Python development environment ready" |