mirror of
https://github.com/katanemo/plano.git
synced 2026-06-29 15:49:40 +02:00
Merge branch 'main' into adil/custom_trace
This commit is contained in:
commit
de1ee1f005
10 changed files with 27 additions and 27 deletions
|
|
@ -1,22 +1,22 @@
|
|||
# build filter using rust toolchain
|
||||
FROM rust:1.80.0 as builder
|
||||
RUN rustup -v target add wasm32-wasi
|
||||
FROM rust:1.82.0 as builder
|
||||
RUN rustup -v target add wasm32-wasip1
|
||||
WORKDIR /arch
|
||||
COPY crates .
|
||||
|
||||
RUN cd prompt_gateway && cargo build --release --target wasm32-wasi
|
||||
RUN cd llm_gateway && cargo build --release --target wasm32-wasi
|
||||
RUN cd prompt_gateway && cargo build --release --target wasm32-wasip1
|
||||
RUN cd llm_gateway && cargo build --release --target wasm32-wasip1
|
||||
|
||||
# copy built filter into envoy image
|
||||
FROM envoyproxy/envoy:v1.31-latest as envoy
|
||||
FROM envoyproxy/envoy:v1.32-latest as envoy
|
||||
|
||||
#Build config generator, so that we have a single build image for both Rust and Python
|
||||
FROM python:3.12-slim as arch
|
||||
|
||||
RUN apt-get update && apt-get install -y gettext-base curl && apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder /arch/target/wasm32-wasi/release/prompt_gateway.wasm /etc/envoy/proxy-wasm-plugins/prompt_gateway.wasm
|
||||
COPY --from=builder /arch/target/wasm32-wasi/release/llm_gateway.wasm /etc/envoy/proxy-wasm-plugins/llm_gateway.wasm
|
||||
COPY --from=builder /arch/target/wasm32-wasip1/release/prompt_gateway.wasm /etc/envoy/proxy-wasm-plugins/prompt_gateway.wasm
|
||||
COPY --from=builder /arch/target/wasm32-wasip1/release/llm_gateway.wasm /etc/envoy/proxy-wasm-plugins/llm_gateway.wasm
|
||||
COPY --from=envoy /usr/local/bin/envoy /usr/local/bin/envoy
|
||||
WORKDIR /config
|
||||
COPY arch/requirements.txt .
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
## Add toolchain
|
||||
|
||||
```sh
|
||||
$ rustup target add wasm32-wasi
|
||||
$ rustup target add wasm32-wasip1
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
```sh
|
||||
$ cargo build --target wasm32-wasi --release
|
||||
$ cargo build --target wasm32-wasip1 --release
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
|
@ -25,7 +25,7 @@ $ cargo test
|
|||
|
||||
- Build filter binary,
|
||||
```
|
||||
$ cargo build --target wasm32-wasi --release
|
||||
$ cargo build --target wasm32-wasip1 --release
|
||||
```
|
||||
- Start envoy with arch_config.yaml and test,
|
||||
```
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ services:
|
|||
- ./envoy.template.yaml:/config/envoy.template.yaml
|
||||
- ./arch_config_schema.yaml:/config/arch_config_schema.yaml
|
||||
- ./tools/cli/config_generator.py:/config/config_generator.py
|
||||
- ../crates/target/wasm32-wasi/release/llm_gateway.wasm:/etc/envoy/proxy-wasm-plugins/llm_gateway.wasm
|
||||
- ../crates/target/wasm32-wasi/release/prompt_gateway.wasm:/etc/envoy/proxy-wasm-plugins/prompt_gateway.wasm
|
||||
- ../crates/target/wasm32-wasip1/release/llm_gateway.wasm:/etc/envoy/proxy-wasm-plugins/llm_gateway.wasm
|
||||
- ../crates/target/wasm32-wasip1/release/prompt_gateway.wasm:/etc/envoy/proxy-wasm-plugins/prompt_gateway.wasm
|
||||
- ~/archgw_logs:/var/log/
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue