Skip to content

Log some progress indicator for downloading files and docker images #2338

@nuke-web3

Description

@nuke-web3

Component

sp1-sdk

Describe the feature you would like

When using cargo prove build --docker I don't see any CPU activity or logging happening, so assumed something was amiss. Turns out that I noticed my network monitor spiking and figured it was the sdk internally pulling the (quite large) sp1 builder image.

sp1/crates/cuda/src/lib.rs

Lines 218 to 221 in 6544380

// Pull the docker image if it's not present
if let Err(e) = Command::new("docker").args(["pull", &image_name]).output() {
return Err(format!("Failed to pull Docker image: {}. Please check your internet connection and Docker permissions.", e).into());
}

I was on a slower network, so this took minutes to complete.

Also related to #2255 in a way: it was hard to discover why things were hanging after resolving the panic... that file download also took order of minutes for me.

I would like a way to get some indication that a docker image and/or file is being downloaded, if possible, piping the log stream of docker pull so it's visible.

Seems this should be possible as IIUC stderr is how things are generally communicated in the build like here:

eprintln!("[sp1] downloaded {} to {:?}", download_url, build_dir.to_str().unwrap(),);

Additional context

Very-nice-to-have: A TUI progress indicator on downloads, perhaps using something like https://docs.rs/indicatif/latest/indicatif/ with streamed download via reqwest::Response::bytes_stream() to stderr if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions