Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
21 changes: 10 additions & 11 deletions crates/cluster-client/zisk/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,19 @@ impl ZiskClusterClient {
let req = JobRequestMessage {
job_kind: Some(job.clone()),
};
let status = match client.job_request(req).await {
Ok(res) => return Ok::<_, Error>(res.into_inner().job_id),
match client.job_request(req).await {
Ok(res) => return Ok(res.into_inner().job_id),
Err(status) if status.message().contains("setup not done") => {
setup(&mut client, self.elf.clone()).await?;
}
Err(status) if matches!(status.code(), Code::Unavailable | Code::Internal) => {
warn!(?status, "job submission failed, retrying...");
sleep(Duration::from_secs(5)).await;
}
Err(status) => {
if status.code() == Code::Unavailable
&& status.message().contains("setup not done")
{
setup(&mut client, self.elf.clone()).await?;
continue;
}
status
return Err(Error::Grpc(status));
}
};
warn!(?status, "job submission failed, retrying...");
sleep(Duration::from_secs(5)).await;
}
};

Expand Down
5 changes: 4 additions & 1 deletion docker/risc0/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ ENV RISC0_VERSION="3.0.5" \

# Run the Risc0 SDK installation script with secret mount
# It will use the RISC0_VERSION, RISC0_CPP_VERSION and RISC0_RUST_VERSION defined above.
RUN --mount=type=secret,id=github_token,env=GITHUB_TOKEN \
RUN --mount=type=secret,id=github_token \
if [ -s /run/secrets/github_token ]; then \
export GITHUB_TOKEN="$(cat /run/secrets/github_token)"; \
fi && \
/tmp/install_risc0_sdk.sh && rm /tmp/install_risc0_sdk.sh

# Verify Risc0 installation (script also does this, but good for Dockerfile sanity)
Expand Down
8 changes: 7 additions & 1 deletion docker/sp1/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ ARG BASE_IMAGE=ere-base:latest

FROM $BASE_IMAGE

# Whether to enable CUDA feature or not.
ARG CUDA

# Install the well known proto files.
RUN apt-get update && apt-get install -y --no-install-recommends \
libprotobuf-dev \
Expand All @@ -21,7 +24,10 @@ ENV SP1_DIR="/root/.sp1" \

# Run the SP1 SDK installation script with secret mount
# It will use the SP1_DIR and SP1_VERSION defined above.
RUN --mount=type=secret,id=github_token,env=GITHUB_TOKEN \
RUN --mount=type=secret,id=github_token \
if [ -s /run/secrets/github_token ]; then \
export GITHUB_TOKEN="$(cat /run/secrets/github_token)"; \
fi && \
/tmp/install_sp1_sdk.sh && rm /tmp/install_sp1_sdk.sh

# Update the image's persistent PATH to include SP1 binaries.
Expand Down
3 changes: 3 additions & 0 deletions docker/sp1/Dockerfile.server
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ FROM $RUNTIME_IMAGE AS runtime
FROM $RUNTIME_CUDA_IMAGE AS runtime_cuda
FROM runtime${CUDA:+_cuda} AS runtime_stage

# Copy SP1 SDK
COPY --from=build_stage /root/.sp1/bin /root/.sp1/bin

# Copy ere-server
COPY --from=build_stage /ere/bin/ere-server /ere/bin/ere-server

Expand Down
10 changes: 6 additions & 4 deletions scripts/sdk_installers/install_sp1_sdk.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e # Exit immediately if a command exits with a non-zero status.
set -eo pipefail

echo "Installing Succinct SP1 Toolchain..."

Expand Down Expand Up @@ -52,6 +52,8 @@ echo " export PATH=\"${SP1_DIR}/bin:\$PATH\""
echo "Then source your profile or open a new terminal."

# Download CUDA prover (supports CUDA compute capabilities 80, 86, 89, 90, 100, 120)
mkdir -p $HOME/.sp1/bin && \
curl -L "https://github.com/succinctlabs/sp1/releases/download/${SP1_VERSION}/sp1_gpu_server_${SP1_VERSION}_x86_64.tar.gz" | \
tar -xzf - -C $HOME/.sp1/bin
if [ -n "$CUDA" ]; then
mkdir -p $HOME/.sp1/bin && \
curl -fL "https://github.com/succinctlabs/sp1/releases/download/${SP1_VERSION}/sp1_gpu_server_${SP1_VERSION}_x86_64.tar.gz" | \
tar -xzf - -C $HOME/.sp1/bin
fi
8 changes: 4 additions & 4 deletions tests/sp1/basic/Cargo.lock

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

Loading