Pre-install common Python packages in workspace venv and warm Docker cache

Install httpx, fastapi, uvicorn, requests, flask, pydantic, numpy, pandas,
matplotlib, pillow, jinja2, pyyaml and more on workspace creation. Also
pre-warm uv cache in Dockerfile so first project setup is near-instant.
uv's global cache (~/.cache/uv/) is shared across all project venvs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-02 09:19:48 +00:00
parent 0a8eee0285
commit 728ab2e8fd
2 changed files with 3 additions and 0 deletions

View File

@@ -257,6 +257,7 @@ async fn ensure_workspace(exec: &LocalExecutor, workdir: &str) {
let venv_path = format!("{}/.venv", workdir);
if !Path::new(&venv_path).exists() {
let _ = exec.execute("uv venv .venv", workdir).await;
let _ = exec.execute("uv pip install httpx fastapi uvicorn requests flask pydantic numpy pandas matplotlib pillow jinja2 pyyaml python-dotenv beautifulsoup4 lxml aiohttp aiofiles pytest rich click typer sqlalchemy", workdir).await;
}
}
}