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:
@@ -13,6 +13,8 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
ENV PATH="/root/.local/bin:$PATH"
|
||||
RUN uv venv --python 3.12 /app/venv && uv pip install --python /app/venv/bin/python sentence-transformers
|
||||
RUN /app/venv/bin/python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')"
|
||||
# Pre-warm uv cache with common packages (shared across all project venvs)
|
||||
RUN uv pip install --python /app/venv/bin/python httpx fastapi uvicorn requests flask pydantic numpy pandas matplotlib pillow jinja2 pyyaml python-dotenv beautifulsoup4 lxml aiohttp aiofiles pytest rich click typer sqlalchemy
|
||||
RUN mkdir -p /app/data/workspaces
|
||||
WORKDIR /app
|
||||
COPY target/aarch64-unknown-linux-musl/release/tori .
|
||||
|
||||
Reference in New Issue
Block a user