Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
# context-guru-proxy: the LLM-proxy integration and eval-containers gateway.
#
# The module uses a local `replace github.com/maximhq/bifrost/core => ../bifrost/core`,
# so the build context MUST be the PARENT directory that contains both repos:
# bifrost is an ordinary published dependency, so the build context is just this
# repo:
#
# docker build -f lab-context-engineering/Dockerfile -t context-guru-proxy .
# docker build -t context-guru-proxy .
#
# (run from .../context-engineering/). CI that builds standalone should either
# `go mod vendor` first or switch the replace to a pinned published bifrost.
#
# CGO is required (tree-sitter for the skeleton component), so the final image is
# glibc-based. It also carries a shell + curl for the eval-containers
# start/health scripts under /opt/gateway.
# The image is glibc-based because CGO is enabled below. It also carries a shell +
# curl for the eval-containers start/health scripts under /opt/gateway.
FROM golang:1.26 AS build
WORKDIR /src
COPY bifrost/ ./bifrost/
COPY lab-context-engineering/ ./lab-context-engineering/
WORKDIR /src/lab-context-engineering
COPY . .
ARG VERSION=dev
ARG COMMIT=none
RUN CGO_ENABLED=1 go build \
Expand All @@ -26,8 +20,8 @@ FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /out/context-guru-proxy /opt/gateway/main
COPY lab-context-engineering/deploy/eval-containers/start /opt/gateway/start
COPY lab-context-engineering/deploy/eval-containers/health /opt/gateway/health
COPY deploy/eval-containers/start /opt/gateway/start
COPY deploy/eval-containers/health /opt/gateway/health
RUN chmod +x /opt/gateway/start /opt/gateway/health
EXPOSE 4000
# Default entrypoint is the eval-containers gateway wrapper; override with
Expand Down
9 changes: 3 additions & 6 deletions deploy/eval-containers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ provider. Swap it in with `EVAL_GATEWAY_IMAGE` — no agent or benchmark changes

## Build

The module uses a local `replace` to `../bifrost/core`, so build from the parent
directory that holds both repos:
The build context is this repo — bifrost is an ordinary published dependency, so no
sibling checkout is needed:

```sh
cd .../context-engineering
docker build -f lab-context-engineering/Dockerfile -t context-guru-proxy:latest .
docker build -t context-guru-proxy:latest .
```

## Run under eval-containers
Expand Down Expand Up @@ -41,5 +40,3 @@ savings per component; per-task attribution improves once a session id is stampe

- OTel `gen_ai` spans are not yet emitted (eval-containers' otelcol ingests them);
today savings come from `/stats`.
- The image build needs the parent-dir context (or `go mod vendor`) until bifrost
is pinned to a published version.
9 changes: 2 additions & 7 deletions examples/llm-d-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,8 @@ See a real run of all three on one input, with the full `messages` before and af
## 3. Prerequisites

- **Go 1.26** and a **C toolchain** (`CGO_ENABLED=1` — the `skeleton` component links tree-sitter via cgo).
- A sibling **bifrost** checkout next to this repo (the module pins it with a local `replace` to
`../bifrost/core`). Directory layout:
```
<parent>/
context-guru/ ← this repo
bifrost/ ← https://github.com/maximhq/bifrost
```
- Nothing else: **bifrost** is an ordinary published module dependency (`go.mod`), so this repo
builds standalone from a plain clone.
- For the two **LLM** configs only: access to an LLM endpoint (any OpenAI- or Anthropic-compatible
API, including a gateway) and its credentials.

Expand Down
5 changes: 2 additions & 3 deletions examples/llm-d-service/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
# Build the context-guru compaction service (bin/context-guru-proxy).
#
# Requires Go 1.26 and a C toolchain: CGO_ENABLED=1 is set below because the
# `skeleton` component links tree-sitter via cgo. The module pins bifrost with a
# local `replace` to ../bifrost/core, so a sibling bifrost checkout must exist
# next to the context-guru repo (see the repo README "Install").
# `skeleton` component links tree-sitter via cgo. bifrost is an ordinary published
# dependency, so this repo builds standalone — no sibling checkout needed.
set -euo pipefail

repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
Expand Down
Loading