fix: comprehensive rewrite to resolve Perplexity blockers
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
# --- Build Stage ---
|
||||
FROM python:3.11-slim AS builder
|
||||
|
||||
# Pin versions for reproducibility
|
||||
ARG AGENT_REPO="https://forge.alexanderwhitestone.com/Timmy_Foundation/hermes-agent.git"
|
||||
ARG AGENT_COMMIT="a89dae9942997b55d1b66330ff62de24ab3d6170"
|
||||
ARG UV_VERSION="0.5.1"
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends curl git build-essential cmake ca-certificates && curl -LsSf https://astral.sh/uv/install.sh | sh && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends curl git build-essential cmake ca-certificates && curl -LsSf https://astral.sh/uv/${UV_VERSION}/install.sh | sh && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV PATH="/root/.local/bin:${PATH}"
|
||||
|
||||
WORKDIR /app
|
||||
# Clone the actual source code
|
||||
RUN git clone ${AGENT_REPO} .
|
||||
# Pin the clone to a specific commit for deterministic builds
|
||||
RUN git clone ${AGENT_REPO} . && git checkout ${AGENT_COMMIT}
|
||||
|
||||
# Install dependencies using uv
|
||||
# Install dependencies and project into venv
|
||||
RUN uv sync --frozen --no-dev
|
||||
|
||||
# --- Final Stage ---
|
||||
@@ -19,11 +22,15 @@ FROM python:3.11-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends curl git socat ripgrep ffmpeg ca-certificates && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy the virtual environment and the source from builder
|
||||
COPY --from=builder /app/.venv /app/.venv
|
||||
# Copy only the venv and the app source
|
||||
COPY --from=builder /app /app
|
||||
ENV PATH="/app/.venv/bin:${PATH}"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Healthcheck to verify the gateway is responding
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
|
||||
CMD curl -f http://localhost:8643/health || exit 1
|
||||
|
||||
EXPOSE 8643
|
||||
ENTRYPOINT ["hermes", "gateway"]
|
||||
|
||||
Reference in New Issue
Block a user