Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deep-prove/src/bin/cli/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub async fn connect(executor: Executor) -> anyhow::Result<()> {
let body = resp
.body_mut()
.with_config()
.limit(1000 * 1024 * 1024)
.limit(200 * 1024 * 1024)
.read_to_vec()?;
file.write_all(&body)?;
info!("proof received, saved to {}", file.path().display());
Expand Down
4 changes: 2 additions & 2 deletions deep-prove/src/bin/worker/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub async fn serve(args: RunMode) -> anyhow::Result<()> {
#[derive(Default)]
struct AppState {
work_queue: Vec<DeepProveRequestV1>,
proofs_queue: Vec<Vec<ProofV1>>,
proofs_queue: Vec<ProofV1>,
}

let RunMode::LocalApi {
Expand Down Expand Up @@ -87,7 +87,7 @@ pub async fn serve(args: RunMode) -> anyhow::Result<()> {
match result {
Ok(proofs) => {
info!("proof generated in {}s", now.elapsed().as_secs());
app_state.lock().await.proofs_queue.push(proofs);
app_state.lock().await.proofs_queue.extend(proofs);
}
Err(err) => error!("failed to generate proof: {err:?}"),
}
Expand Down
2 changes: 1 addition & 1 deletion deep-prove/src/bin/worker/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ enum RunMode {
json: bool,

/// The maximal proof request size to accept (in MB)
#[arg(long, env, default_value_t = 100)]
#[arg(long, env, default_value_t = 200)]
max_body_size: usize,
},
}
Expand Down
28 changes: 28 additions & 0 deletions docker/deep-prove-aws-client-dockerfile
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deep-prove-aws-client.dockerfile?

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM rustlang/rust:nightly-slim AS builder
RUN apt-get update && apt-get install -y git protobuf-compiler libssl-dev pkg-config

WORKDIR /deep-prove-client
COPY . .

RUN cargo install --locked --path deep-prove --bin deep-prove-client


# Create the actual final image
FROM docker.io/library/ubuntu:22.04

ARG USER_ID=1000
ARG GROUP_ID=1000
RUN groupadd -g ${GROUP_ID} lagrange && \
useradd -m -u ${USER_ID} -g lagrange lagrange

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y libssl3 ca-certificates && \
update-ca-certificates && \
rm -rf /var/lib/apt/lists/*

COPY --from=builder /usr/local/cargo/bin/deep-prove-client /usr/local/bin
ENV RUST_BACKTRACE=full
USER lagrange
ENTRYPOINT ["/usr/local/bin/deep-prove-client", "local-api"]
CMD ["fetch"]
28 changes: 28 additions & 0 deletions docker/deep-prove-aws-prover.dockerfile
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deep-prove-aws-worker.dockerfile?

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM rustlang/rust:nightly-slim AS builder
RUN apt-get update && apt-get install -y git protobuf-compiler libssl-dev pkg-config

WORKDIR /deep-prove-worker
COPY . .

RUN cargo install --locked --path deep-prove --bin deep-prove-worker


# Create the actual final image
FROM docker.io/library/ubuntu:22.04

ARG USER_ID=1000
ARG GROUP_ID=1000
RUN groupadd -g ${GROUP_ID} lagrange && \
useradd -m -u ${USER_ID} -g lagrange lagrange

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y libssl3 ca-certificates && \
update-ca-certificates && \
rm -rf /var/lib/apt/lists/*

COPY --from=builder /usr/local/cargo/bin/deep-prove-worker /usr/local/bin
EXPOSE 8080
ENV RUST_BACKTRACE=full
USER lagrange
CMD ["/usr/local/bin/deep-prove-worker", "local-api"]
Loading