Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to run cli in docker container #25

Open
sleeply7777 opened this issue Oct 30, 2024 · 4 comments
Open

failed to run cli in docker container #25

sleeply7777 opened this issue Oct 30, 2024 · 4 comments

Comments

@sleeply7777
Copy link

sleeply7777 commented Oct 30, 2024

ubuntu 22.04
apt update && apt install build-essential pkg-config git -y
git checkout 0.3.2

thread 'tokio-runtime-worker' panicked at src/analytics.rs:52:14:
called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.mixpanel.com")), port: None, path: "/track", query: Some("ip=1"), fragment: None }, source: hyper_util::client::legacy::Error(Connect, Ssl(Error { code: ErrorCode(5), cause: None }, X509VerifyResult { code: 0, error: "ok" })) }

Where is the problem? What needs to be installed, or is it that it can't run inside the container?

@sleeply7777 sleeply7777 changed the title faile to run cli in docker container failed to run cli in docker container Oct 30, 2024
@shantnudon
Copy link

Can u share your docker config file and an elaborated process on how are you doing that.

@sleeply7777
Copy link
Author

FROM ubuntu:22.04
RUN apt-get update && apt-get install -y \
    sudo wget curl git build-essential libssl-dev pkg-config clang \
    && rm -rf /var/lib/apt/lists/*
CMD ["bash"]

Based on this base image, I created a container and installed Rust Cargo 1.79.0 as well as build-essential, pkg-config, and libssl-dev inside the container. I used the 0.3.2 tag to create the prover.
The first execution showed a panic with

'time_zone': iana_time_zone::get_timezone().unwrap()

I resolved this issue by apt install tzdata. On restarting, the X509VerifyResult issue occurred.
My device is an Apple M2.

@doubleTroub1e
Copy link

hey, I've start it fine with docker, but faced issues with code, my prover-id, it wasn't created automatically, so I had to add it manually
see logs:

nexus-1  |    Compiling nexus-core v0.2.3 (https://github.com/nexus-xyz/nexus-zkvm.git#7162d8dd)
nexus-1  |     Finished `release` profile [optimized] target(s) in 3m 05s
nexus-1  |      Running `target/release/prover beta.orchestrator.nexus.xyz`
nexus-1  | Could not read prover-id file: No such file or directory (os error 2)
nexus-1  | Failed to create .nexus directory: File exists (os error 17)
nexus-1  | Connecting to wss://beta.orchestrator.nexus.xyz:443/prove...
nexus-1  | Connected.
nexus-1  | Your assigned prover identifier is yuckier-reseaux-13.
nexus-1  | Received a 21060 byte program to prove with 3 bytes of input
nexus-1  | Program trace is 196 steps. Proving 10 steps starting at 25...
nexus-1  | Proved step 25 at 7.72 proof cycles/sec.
nexus-1  | Proved step 26 at 7.31 proof cycles/sec.
nexus-1  | Proved step 27 at 6.13 proof cycles/sec.

and my Dockerfile, maybe worth adding it here

# Use a minimal base image
FROM ubuntu:22.04

# Define build-time variables
ARG DEBIAN_FRONTEND=noninteractive

# ===================================================
# Environment Configuration
# ===================================================
ENV HOME=/root \
    PATH=/root/.cargo/bin:$PATH \
    NEXUS_HOME=/root/.nexus \
    NONINTERACTIVE=true

# Install necessary dependencies and clean up to reduce image size
RUN apt update && \
    apt install -y --no-install-recommends \
        wget \
        curl \
        cmake \
        build-essential \
        ca-certificates \
        pkg-config \
        libssl-dev \
        git && \
    rm -rf /var/lib/apt/lists/*

# Install Rust and add RISC-V target
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y && \
    rustup target add riscv32i-unknown-none-elf && \
    rm -rf /root/.cargo/registry /root/.cargo/git && \
    echo 'source $HOME/.cargo/env' >> $HOME/.bashrc

# Set working directory
WORKDIR $HOME

# Download and set up entrypoint script
RUN curl -L https://cli.nexus.xyz/install.sh -o /root/entrypoint.sh && \
    chmod +x /root/entrypoint.sh

# Define a volume
VOLUME [$NEXUS_HOME]

# Define the default entrypoint
ENTRYPOINT ["/bin/bash", "/root/entrypoint.sh"]

@doubleTroub1e
Copy link

and one more question - can I start my node under a different location using same prover-id?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants