From cd01142130c16054dc5f76802d897bee0146c882 Mon Sep 17 00:00:00 2001 From: Sreekanth Date: Wed, 13 Nov 2024 20:31:42 +0530 Subject: [PATCH] chore: fix sideinput-udf image build (#103) Signed-off-by: Sreekanth --- Cargo.toml | 2 +- examples/sideinput/Dockerfile | 2 +- examples/sideinput/udf/Cargo.toml | 8 ++------ examples/sideinput/udf/Dockerfile | 6 +++--- examples/sideinput/udf/Makefile | 4 ---- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7e2e63b..8f2a864 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["numaflow", "examples/*"] +members = ["numaflow", "examples/*", "examples/sideinput/udf"] # Only check / build main crate by default (check all with `--workspace`) default-members = ["numaflow"] resolver = "2" diff --git a/examples/sideinput/Dockerfile b/examples/sideinput/Dockerfile index 898bc32..b43de22 100644 --- a/examples/sideinput/Dockerfile +++ b/examples/sideinput/Dockerfile @@ -11,7 +11,7 @@ WORKDIR /numaflow-rs/examples/sideinput RUN cargo build --release # our final base -FROM rust AS sideinput +FROM debian:bullseye AS sideinput # copy the build artifact from the build stage COPY --from=build /numaflow-rs/target/release/sideinput . diff --git a/examples/sideinput/udf/Cargo.toml b/examples/sideinput/udf/Cargo.toml index cabeb5c..c5ef08e 100644 --- a/examples/sideinput/udf/Cargo.toml +++ b/examples/sideinput/udf/Cargo.toml @@ -5,13 +5,9 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[[bin]] -name = "server" -path = "src/main.rs" - [dependencies] tonic = "0.10.2" tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } -numaflow = { path = "../../../" } +numaflow = { path = "../../../numaflow" } chrono = "0.4.30" -notify = "6.1.1" \ No newline at end of file +notify = "6.1.1" diff --git a/examples/sideinput/udf/Dockerfile b/examples/sideinput/udf/Dockerfile index 1cc93ab..e247eb6 100644 --- a/examples/sideinput/udf/Dockerfile +++ b/examples/sideinput/udf/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.80-bookworm AS build +FROM rust:1.82-bullseye AS build RUN apt-get update RUN apt-get install protobuf-compiler -y @@ -14,9 +14,9 @@ RUN cargo build --release FROM debian:bookworm AS sideinput-udf # copy the build artifact from the build stage -COPY --from=build /numaflow-rs/examples/sideinput/udf/target/release/server . +COPY --from=build /numaflow-rs/target/release/sideinput-udf . RUN mkdir -p /var/numaflow/sideinputs # set the startup command to run your binary -CMD ["./server"] \ No newline at end of file +CMD ["./sideinput-udf"] diff --git a/examples/sideinput/udf/Makefile b/examples/sideinput/udf/Makefile index d6932c9..cc6a29b 100644 --- a/examples/sideinput/udf/Makefile +++ b/examples/sideinput/udf/Makefile @@ -14,7 +14,3 @@ image: update -f ${DOCKER_FILE_PATH} \ -t ${IMAGE_REGISTRY} . @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi - -.PHONY: clean -clean: - -rm -rf target