Snarkify
  • 🏗️GPU Prover Network
    • Introduction
    • Deploy a Elastic Prover
      • Integrate Elastic Prover SDK
    • Snakrify CLI
      • Installation
      • Authentication
      • Service Initialization
      • Build & Deployment
      • Proof Generation
      • Team Management
      • GPU Shell Management
    • Advanced Topics
      • Webhook
  • 🏚️High-Performance ZKP
    • zkEVM Halo2 GPU Prover
      • MSM
      • NTT
      • Quotient Polynomial Evaluation
      • KZG Multiopen
      • Polynomial Inversion
      • Permutation Generation
    • ZPrize
  • 🐺Sirius Folding
    • Introduction
    • Quickstart
    • Examples
      • Fold a Summation Circuit
      • Fold a Fibonacci Circuit
      • Fold a Halo2 Circuit
      • Fold the zkevm-circuits
    • Terminologies
    • Sirius Folding APIs
      • `StepCircuit` trait
      • `PublicParams` Struct
      • `IVC` struct
  • LInks
    • Github
    • Telegram Group
    • snarkify.io
Powered by GitBook
On this page
  • Build Your Container
  • Option 1: Snarkify command (recommended)
  • Option 2: Docker command
  • Deploy Your Container
  1. GPU Prover Network
  2. Snakrify CLI

Build & Deployment

Build Your Container

Option 1: Snarkify command (recommended)

Simply run:

snarkify build
  • To build from a sub-directory, simply use the --base_dir={path_to_sub_dir} option.

Heads up! The first build is like brewing a fine cup of coffee—it takes a bit longer, but it's worth the wait. Patience is a virtue, and great things are brewing!

Option 2: Docker command

Alternatively, it's also possible to use native docker command to build your image by following these steps:

  1. Have a Dockerfile ready to build your code. Here is a template Dockerfile to invoke the snarkify binary.

# Use a smaller, specific version of the Rust image for building
FROM --platform=linux/amd64 rust:latest AS builder

# Create a new empty project
RUN USER=root cargo new --bin snarkify
WORKDIR /snarkify

# Copy over your manifests
COPY ./Cargo.lock ./Cargo.toml ./

# Cache dependencies by building a dummy project
RUN cargo build --release && \
    rm src/*.rs && \
    rm ./target/release/deps/snarkify*

# Build your project for release
COPY ./src ./src
RUN cargo build --release

# Use a slim variant for the runtime stage to reduce size
FROM --platform=linux/amd64 ubuntu:22.04

# Copy the build artifact from the build stage
COPY --from=builder /snarkify/target/release/snarkify /usr/local/bin/snarkify


# Set the startup command to run your binary
CMD ["/usr/local/bin/snarkify"]
  1. Use docker command to build an image

docker build -t {your_image_name} .

Deploy Your Container

Once your Docker image has been successfully built, you're just one step away from launching your service. To proceed, simply execute the following command:

snarkify deploy
  • You can assign a unique tag to each deployment for easy reference by using the --tag option.

  • Should you need to set environment variables, you can conveniently update them using the --env flag. For example, snarkify deploy --env foo=bar --env hello=aloha.

  • If you use the second option (Docker command) to build your image, you need to specify the image using --image option.

PreviousService InitializationNextProof Generation

Last updated 4 months ago

🏗️