Skip to content

Commit de10e51

Browse files
authored
docker pull stderr and stdout exposed
partial fix for #2338
1 parent 6544380 commit de10e51

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

crates/cuda/src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,16 @@ impl SP1CudaProver {
216216
}
217217

218218
// Pull the docker image if it's not present
219-
if let Err(e) = Command::new("docker").args(["pull", &image_name]).output() {
220-
return Err(format!("Failed to pull Docker image: {}. Please check your internet connection and Docker permissions.", e).into());
219+
let status = Command::new("docker")
220+
.args(&["pull", &image_name])
221+
.status()
222+
.map_err(|e| format!("Failed to pull Docker image: {}. Please check your internet connection and Docker permissions.", e))?;
223+
224+
if !status.success() {
225+
return Err(format!("`docker pull` exited with: {}", status).into());
221226
}
222227

228+
223229
// Start the docker container
224230
let rust_log_level = std::env::var("RUST_LOG").unwrap_or_else(|_| "none".to_string());
225231
Command::new("docker")

0 commit comments

Comments
 (0)