Skip to content

Commit

Permalink
Fix Docker by using protoc with include/. Add protoc to GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
HammadB committed Dec 13, 2023
1 parent 7f001fa commit d7327b3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/chroma-worker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v2
- name: Build
run: cargo build --verbose
- name: Test
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions rust/worker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ edition = "2021"
[dependencies]
tonic = "0.10"
prost = "0.12"
prost-types = "0.12"
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
tokio-util = "0.7.10"
rand = "0.8.5"
Expand Down
8 changes: 7 additions & 1 deletion rust/worker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
FROM rust:1.74.1 as builder

WORKDIR /chroma
WORKDIR /chroma/
COPY . .

ENV PROTOC_ZIP=protoc-25.1-linux-x86_64.zip
RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v25.1/$PROTOC_ZIP \
&& unzip -o $PROTOC_ZIP -d /usr/local bin/protoc \
&& unzip -o $PROTOC_ZIP -d /usr/local 'include/*' \
&& rm -f $PROTOC_ZIP

RUN cargo build

# For now this runs cargo test since we have no main binary
Expand Down

0 comments on commit d7327b3

Please sign in to comment.