Skip to content

Commit

Permalink
Merge pull request #3 from saint1991/docker-container
Browse files Browse the repository at this point in the history
add Dockerfile
  • Loading branch information
saint1991 authored Oct 19, 2024
2 parents 3f655e7 + c0f4bc4 commit 8b74afa
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 78 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.vscode
.gitignore
datasets
target
README.md
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ target
gen
*.duckdb
.env
.DS_Store
datasets
91 changes: 42 additions & 49 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ version = "0.1.0"
edition = "2021"

[dependencies]
anyhow = { version = "1.0.89", features = ["backtrace", "std"] }
anyhow = { version = "1.0.90", features = ["backtrace", "std"] }
async-stream = { version = "0.3.6" }
chrono = { version = "0.4.38" }
duckdb = { version = "1.0.0", features = ["bundled", "chrono"] }
duckdb = { version = "1.1.1", features = ["bundled", "chrono"] }
env_logger = { version = "0.11.5" }
futures-core = { version = "0.3.31" }
log = { version = "0.4.22" }
prost = { version = "0.13.3" }
prost-types = { version = "0.13.3" }
thiserror = "1.0.64"
thiserror = { version = "1.0.64" }
tokio = { version = "1.40.0", features = ["rt-multi-thread", "macros", "sync" ] }
tokio-stream = { version = "0.1.16" }
tonic = { version = "0.12.3" }
Expand Down
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# syntax=docker/dockerfile:1

FROM rust:1.82-slim-bookworm AS builder

WORKDIR /home/gduck
RUN apt-get update -y \
&& apt-get install -y git g++ cmake ninja-build libssl-dev protobuf-compiler

COPY . /home/gduck
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/home/gduck/target \
cargo build --release \
&& mkdir /home/gduck/dist \
&& cp /home/gduck/target/release/gduck-rpc /home/gduck/dist


FROM debian:bookworm-slim

COPY --from=builder /home/gduck/dist/gduck-rpc /gduck-rpc
ENV RUST_LOG=info RUST_BACKTRACE=1

ENTRYPOINT ["/gduck-rpc"]
4 changes: 2 additions & 2 deletions client/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name = "client"
version = "0.1.0"
requires-python = ">=3.13"
dependencies = [
"grpcio-tools>=1.66.2",
"grpcio>=1.66.2",
"grpcio-tools>=1.67.0",
"grpcio>=1.67.0",
"python-dateutil>=2.9.0.post0",
]

Expand Down
Loading

0 comments on commit 8b74afa

Please sign in to comment.