Skip to content
Open
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
6 changes: 3 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.extproc
file: ./tools/docker/Dockerfile.extproc
push: ${{ github.event_name != 'pull_request' }} # Only push on merge to main, not on PRs
tags: |
${{ inputs.is_nightly == true && format('ghcr.io/{0}/semantic-router/extproc:nightly-{1}', env.REPOSITORY_OWNER_LOWER, steps.date.outputs.date_tag) || format('ghcr.io/{0}/semantic-router/extproc:{1}', env.REPOSITORY_OWNER_LOWER, github.sha) }}
Expand Down Expand Up @@ -87,8 +87,8 @@ jobs:
- name: Build and push llm-katan Docker image
uses: docker/build-push-action@v5
with:
context: ./e2e-tests/llm-katan
file: ./e2e-tests/llm-katan/Dockerfile
context: .
file: ./tools/docker/Dockerfile.llm-katan
push: ${{ github.event_name != 'pull_request' }} # Only push on merge to main, not on PRs
tags: |
${{ inputs.is_nightly == true && format('ghcr.io/{0}/semantic-router/llm-katan:nightly-{1}', env.REPOSITORY_OWNER_LOWER, steps.date.outputs.date_tag) || format('ghcr.io/{0}/semantic-router/llm-katan:{1}', env.REPOSITORY_OWNER_LOWER, github.sha) }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.extproc
file: ./tools/docker/Dockerfile.extproc
push: true
tags: |
ghcr.io/${{ env.REPOSITORY_OWNER_LOWER }}/semantic-router/extproc:${{ steps.extract_tag.outputs.tag }}
Expand Down Expand Up @@ -73,8 +73,8 @@ jobs:
- name: Build and push llm-katan Docker image
uses: docker/build-push-action@v5
with:
context: ./e2e-tests/llm-katan
file: ./e2e-tests/llm-katan/Dockerfile
context: .
file: ./tools/docker/Dockerfile.llm-katan
push: true
tags: |
ghcr.io/${{ env.REPOSITORY_OWNER_LOWER }}/semantic-router/llm-katan:${{ steps.extract_tag.outputs.tag }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/precommit-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Create and publish Precommit Image
on:
push:
paths:
- 'Dockerfile.precommit'
- 'tools/docker/Dockerfile.precommit'
pull_request:
paths:
- 'Dockerfile.precommit'
- 'tools/docker/Dockerfile.precommit'

jobs:
build_and_push:
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.precommit
file: ./tools/docker/Dockerfile.precommit
push: ${{ github.event_name != 'pull_request' }} # Only push on merge to main, not on PRs
tags: |
${{ inputs.is_nightly != true && format('ghcr.io/{0}/semantic-router/precommit:latest', env.REPOSITORY_OWNER_LOWER) || '' }}
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
semantic-router:
build:
context: .
dockerfile: Dockerfile.extproc
dockerfile: tools/docker/Dockerfile.extproc
container_name: semantic-router
ports:
- "50051:50051"
Expand Down Expand Up @@ -48,8 +48,8 @@ services:
# Mock vLLM service for testing profile
mock-vllm:
build:
context: ./tools/mock-vllm
dockerfile: Dockerfile
context: .
dockerfile: tools/docker/Dockerfile.mock-vllm
container_name: mock-vllm
profiles: ["testing"]
ports:
Expand Down Expand Up @@ -96,8 +96,8 @@ services:
# LLM Katan service for testing
llm-katan:
build:
context: ./e2e-tests/llm-katan
dockerfile: Dockerfile
context: .
dockerfile: tools/docker/Dockerfile.llm-katan
container_name: llm-katan
profiles: ["testing", "llm-katan"]
ports:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

# Copy requirements first for better layer caching
COPY requirements.txt ./
COPY e2e-tests/llm-katan/requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

# Copy the llm_katan package
COPY llm_katan/ ./llm_katan/
COPY pyproject.toml ./
COPY README.md ./
COPY e2e-tests/llm-katan/llm_katan/ ./llm_katan/
COPY e2e-tests/llm-katan/pyproject.toml ./
COPY e2e-tests/llm-katan/README.md ./

# Install the package in development mode
RUN pip install -e .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*

COPY requirements.txt ./
COPY tools/mock-vllm/requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

COPY app.py ./
COPY tools/mock-vllm/app.py ./

EXPOSE 8000

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions tools/make/docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ docker-build-all: docker-build-extproc docker-build-llm-katan docker-build-preco
docker-build-extproc:
@$(LOG_TARGET)
@echo "Building extproc Docker image..."
@$(CONTAINER_RUNTIME) build -f Dockerfile.extproc -t $(DOCKER_REGISTRY)/extproc:$(DOCKER_TAG) .
@$(CONTAINER_RUNTIME) build -f tools/docker/Dockerfile.extproc -t $(DOCKER_REGISTRY)/extproc:$(DOCKER_TAG) .

# Build llm-katan Docker image
docker-build-llm-katan:
@$(LOG_TARGET)
@echo "Building llm-katan Docker image..."
@$(CONTAINER_RUNTIME) build -f e2e-tests/llm-katan/Dockerfile -t $(DOCKER_REGISTRY)/llm-katan:$(DOCKER_TAG) e2e-tests/llm-katan/
@$(CONTAINER_RUNTIME) build -f tools/docker/Dockerfile.llm-katan -t $(DOCKER_REGISTRY)/llm-katan:$(DOCKER_TAG) .

# Build precommit Docker image
docker-build-precommit:
@$(LOG_TARGET)
@echo "Building precommit Docker image..."
@$(CONTAINER_RUNTIME) build -f Dockerfile.precommit -t $(DOCKER_REGISTRY)/precommit:$(DOCKER_TAG) .
@$(CONTAINER_RUNTIME) build -f tools/docker/Dockerfile.precommit -t $(DOCKER_REGISTRY)/precommit:$(DOCKER_TAG) .

# Test llm-katan Docker image locally
docker-test-llm-katan:
Expand Down
10 changes: 5 additions & 5 deletions website/docs/troubleshooting/network-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ PY

## 2. Build with Go mirrors (Dockerfile override)

When building `Dockerfile.extproc`, the Go stage may hang on `proxy.golang.org`. Create an override Dockerfile that enables mirrors without touching the original.
When building `tools/docker/Dockerfile.extproc`, the Go stage may hang on `proxy.golang.org`. Create an override Dockerfile that enables mirrors without touching the original.

1) Create `Dockerfile.extproc.cn` at repo root with this content:
1) Create `tools/docker/Dockerfile.extproc.cn` with this content:

```Dockerfile
# syntax=docker/dockerfile:1
Expand Down Expand Up @@ -124,14 +124,14 @@ ENTRYPOINT ["/app/entrypoint.sh"]
services:
semantic-router:
build:
dockerfile: Dockerfile.extproc.cn
dockerfile: tools/docker/Dockerfile.extproc.cn
```

## 3. Mock vLLM (PyPI mirror via Dockerfile override)

For the optional testing profile, create an override Dockerfile to configure pip mirrors.

1) Create `tools/mock-vllm/Dockerfile.cn`:
1) Create `tools/docker/Dockerfile.mock-vllm.cn`:

```Dockerfile
FROM python:3.11-slim
Expand All @@ -156,7 +156,7 @@ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
services:
mock-vllm:
build:
dockerfile: Dockerfile.cn
dockerfile: tools/docker/Dockerfile.mock-vllm.cn
```

## 4. Build and run
Expand Down
Loading