add docker compose
This commit is contained in:
5 files changed
+169
-25
No files matched your search
+39
@@ -0,0 +1,39 @@
|
||||
FROM python:3.12-slim-bookworm AS base
|
||||
|
||||
# Install uv binary from official image
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||
|
||||
# Install system dependencies (ca-certificates, curl, bubblewrap for sandbox)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
bubblewrap \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Configure Python and uv environment
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
UV_COMPILE_BYTECODE=1 \
|
||||
UV_LINK_MODE=copy \
|
||||
PYTHONPATH="/app/src:/app:$PYTHONPATH"
|
||||
|
||||
# Copy dependency specifications first for Docker layer caching
|
||||
COPY pyproject.toml uv.lock README.md ./
|
||||
RUN uv sync --frozen --no-dev --no-install-project
|
||||
|
||||
# Copy application source code and resource files
|
||||
COPY src/ ./src/
|
||||
COPY extensions/ ./extensions/
|
||||
COPY skills/ ./skills/
|
||||
COPY main.py run.py ./
|
||||
|
||||
# Finalize project sync
|
||||
RUN uv sync --frozen --no-dev
|
||||
|
||||
# Use the virtual environment created by uv
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
# Default command to run HomeAgent bot
|
||||
CMD ["python", "run.py"]
|
||||
Reference in new issue
Block a user