Skip to content

Commit 7a28ebb

Browse files
committed
chore: move all dockerfile into tools
Signed-off-by: bitliu <[email protected]>
1 parent b3658bc commit 7a28ebb

File tree

11 files changed

+28
-28
lines changed

11 files changed

+28
-28
lines changed

.github/workflows/docker-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
uses: docker/build-push-action@v5
4848
with:
4949
context: .
50-
file: ./Dockerfile.extproc
50+
file: ./tools/docker/Dockerfile.extproc
5151
push: ${{ github.event_name != 'pull_request' }} # Only push on merge to main, not on PRs
5252
tags: |
5353
${{ 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) }}
@@ -87,8 +87,8 @@ jobs:
8787
- name: Build and push llm-katan Docker image
8888
uses: docker/build-push-action@v5
8989
with:
90-
context: ./e2e-tests/llm-katan
91-
file: ./e2e-tests/llm-katan/Dockerfile
90+
context: .
91+
file: ./tools/docker/Dockerfile.llm-katan
9292
push: ${{ github.event_name != 'pull_request' }} # Only push on merge to main, not on PRs
9393
tags: |
9494
${{ 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) }}

.github/workflows/docker-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
uses: docker/build-push-action@v5
3535
with:
3636
context: .
37-
file: ./Dockerfile.extproc
37+
file: ./tools/docker/Dockerfile.extproc
3838
push: true
3939
tags: |
4040
ghcr.io/${{ env.REPOSITORY_OWNER_LOWER }}/semantic-router/extproc:${{ steps.extract_tag.outputs.tag }}
@@ -73,8 +73,8 @@ jobs:
7373
- name: Build and push llm-katan Docker image
7474
uses: docker/build-push-action@v5
7575
with:
76-
context: ./e2e-tests/llm-katan
77-
file: ./e2e-tests/llm-katan/Dockerfile
76+
context: .
77+
file: ./tools/docker/Dockerfile.llm-katan
7878
push: true
7979
tags: |
8080
ghcr.io/${{ env.REPOSITORY_OWNER_LOWER }}/semantic-router/llm-katan:${{ steps.extract_tag.outputs.tag }}

.github/workflows/precommit-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Create and publish Precommit Image
33
on:
44
push:
55
paths:
6-
- 'Dockerfile.precommit'
6+
- 'tools/docker/Dockerfile.precommit'
77
pull_request:
88
paths:
9-
- 'Dockerfile.precommit'
9+
- 'tools/docker/Dockerfile.precommit'
1010

1111
jobs:
1212
build_and_push:
@@ -38,7 +38,7 @@ jobs:
3838
uses: docker/build-push-action@v5
3939
with:
4040
context: .
41-
file: ./Dockerfile.precommit
41+
file: ./tools/docker/Dockerfile.precommit
4242
push: ${{ github.event_name != 'pull_request' }} # Only push on merge to main, not on PRs
4343
tags: |
4444
${{ inputs.is_nightly != true && format('ghcr.io/{0}/semantic-router/precommit:latest', env.REPOSITORY_OWNER_LOWER) || '' }}

docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
semantic-router:
55
build:
66
context: .
7-
dockerfile: Dockerfile.extproc
7+
dockerfile: tools/docker/Dockerfile.extproc
88
container_name: semantic-router
99
ports:
1010
- "50051:50051"
@@ -48,8 +48,8 @@ services:
4848
# Mock vLLM service for testing profile
4949
mock-vllm:
5050
build:
51-
context: ./tools/mock-vllm
52-
dockerfile: Dockerfile
51+
context: .
52+
dockerfile: tools/docker/Dockerfile.mock-vllm
5353
container_name: mock-vllm
5454
profiles: ["testing"]
5555
ports:
@@ -96,8 +96,8 @@ services:
9696
# LLM Katan service for testing
9797
llm-katan:
9898
build:
99-
context: ./e2e-tests/llm-katan
100-
dockerfile: Dockerfile
99+
context: .
100+
dockerfile: tools/docker/Dockerfile.llm-katan
101101
container_name: llm-katan
102102
profiles: ["testing", "llm-katan"]
103103
ports:
File renamed without changes.
File renamed without changes.

e2e-tests/llm-katan/Dockerfile renamed to tools/docker/Dockerfile.llm-katan

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1616
&& rm -rf /var/lib/apt/lists/*
1717

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

2222
# Copy the llm_katan package
23-
COPY llm_katan/ ./llm_katan/
24-
COPY pyproject.toml ./
25-
COPY README.md ./
23+
COPY e2e-tests/llm-katan/llm_katan/ ./llm_katan/
24+
COPY e2e-tests/llm-katan/pyproject.toml ./
25+
COPY e2e-tests/llm-katan/README.md ./
2626

2727
# Install the package in development mode
2828
RUN pip install -e .

tools/mock-vllm/Dockerfile renamed to tools/docker/Dockerfile.mock-vllm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
66
curl \
77
&& rm -rf /var/lib/apt/lists/*
88

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

12-
COPY app.py ./
12+
COPY tools/mock-vllm/app.py ./
1313

1414
EXPOSE 8000
1515

File renamed without changes.

tools/make/docker.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ docker-build-all: docker-build-extproc docker-build-llm-katan docker-build-preco
1515
docker-build-extproc:
1616
@$(LOG_TARGET)
1717
@echo "Building extproc Docker image..."
18-
@$(CONTAINER_RUNTIME) build -f Dockerfile.extproc -t $(DOCKER_REGISTRY)/extproc:$(DOCKER_TAG) .
18+
@$(CONTAINER_RUNTIME) build -f tools/docker/Dockerfile.extproc -t $(DOCKER_REGISTRY)/extproc:$(DOCKER_TAG) .
1919

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

2626
# Build precommit Docker image
2727
docker-build-precommit:
2828
@$(LOG_TARGET)
2929
@echo "Building precommit Docker image..."
30-
@$(CONTAINER_RUNTIME) build -f Dockerfile.precommit -t $(DOCKER_REGISTRY)/precommit:$(DOCKER_TAG) .
30+
@$(CONTAINER_RUNTIME) build -f tools/docker/Dockerfile.precommit -t $(DOCKER_REGISTRY)/precommit:$(DOCKER_TAG) .
3131

3232
# Test llm-katan Docker image locally
3333
docker-test-llm-katan:

0 commit comments

Comments
 (0)