-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: completed testing of csv and jsonl ingests with the new worker
- Loading branch information
1 parent
c979f0c
commit ce05422
Showing
13 changed files
with
1,046 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,7 +156,7 @@ jobs: | |
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
|
||
file_worker: | ||
csv_jsonl_worker: | ||
name: Push File Worker image | ||
runs-on: ${{ matrix.runner }} | ||
strategy: | ||
|
@@ -187,7 +187,7 @@ jobs: | |
with: | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
trieve/file_worker | ||
trieve/csv_jsonl_worker: | ||
tags: | | ||
type=raw,latest | ||
type=sha | ||
|
@@ -197,11 +197,57 @@ jobs: | |
with: | ||
platforms: ${{ matrix.platform }} | ||
context: server/ | ||
file: ./server/Dockerfile.file-worker | ||
file: ./server/Dockerfile.csv-jsonl-worker | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
file_worker: | ||
name: Push File Worker image | ||
runs-on: ${{ matrix.runner }} | ||
strategy: | ||
matrix: | ||
runner: [blacksmith-8vcpu-ubuntu-2204] | ||
platform: [linux/amd64] | ||
exclude: | ||
- runner: blacksmith-8vcpu-ubuntu-2204 | ||
platform: linux/arm64 | ||
- runner: blacksmith-8vcpu-ubuntu-2204-arm | ||
platform: linux/amd64 | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
trieve/file_worker | ||
tags: | | ||
type=raw,latest | ||
type=sha | ||
- name: Build and push Docker image | ||
uses: useblacksmith/[email protected] | ||
with: | ||
platforms: ${{ matrix.platform }} | ||
context: server/ | ||
file: ./server/Dockerfile.file-worker | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
group_worker: | ||
name: Push Group worker | ||
runs-on: ${{ matrix.runner }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM rust:1.81-slim-bookworm AS chef | ||
# We only pay the installation cost once, | ||
# it will be cached from the second build onwards | ||
RUN apt-get update -y && apt-get -y install pkg-config libssl-dev libpq-dev g++ curl | ||
RUN cargo install cargo-chef | ||
WORKDIR app | ||
|
||
FROM chef AS planner | ||
COPY . . | ||
RUN cargo chef prepare --recipe-path recipe.json | ||
|
||
FROM chef AS builder | ||
COPY --from=planner /app/recipe.json recipe.json | ||
# Build dependencies - this is the caching Docker layer! | ||
RUN cargo chef cook --release --recipe-path recipe.json --bin "csv-jsonl-worker" | ||
# Build application | ||
COPY . . | ||
RUN cargo build --release --features "runtime-env" --bin "csv-jsonl-worker" | ||
|
||
FROM debian:bookworm-slim as runtime | ||
RUN apt-get update -y && apt-get -y install pkg-config libssl-dev libpq-dev ca-certificates | ||
WORKDIR /app | ||
COPY ./migrations/ /app/migrations | ||
COPY --from=builder /app/target/release/csv-jsonl-worker" /app/csv-jsonl-worker" | ||
|
||
|
||
EXPOSE 8090 | ||
ENTRYPOINT ["/app/csv-jsonl-worker"] |
Oops, something went wrong.