MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / pull_supervisor_image

Function pull_supervisor_image

crates/openshell-driver-docker/src/lib.rs:3211–3228  ·  view source on GitHub ↗
(docker: &Docker, image: &str)

Source from the content-addressed store, hash-verified

3209}
3210
3211async fn pull_supervisor_image(docker: &Docker, image: &str) -> CoreResult<()> {
3212 let mut stream = docker.create_image(
3213 Some(CreateImageOptions {
3214 from_image: Some(image.to_string()),
3215 ..Default::default()
3216 }),
3217 None,
3218 None,
3219 );
3220 while let Some(result) = stream.next().await {
3221 result.map_err(|err| {
3222 Error::config(format!(
3223 "failed to pull docker supervisor image '{image}': {err}",
3224 ))
3225 })?;
3226 }
3227 Ok(())
3228}
3229
3230/// Create a short-lived container from `image`, stream out the supervisor
3231/// binary as a tar archive, and return the untarred file bytes. The

Callers 1

Calls 2

configFunction · 0.85
nextMethod · 0.45

Tested by

no test coverage detected