#mcai #worker #stop #io #starting #bollard

mcai-docker

Library to start and stop MCAI workers images with Docker

5 releases

0.2.2 May 7, 2024
0.2.1 Sep 9, 2022
0.2.0 Jun 30, 2022
0.1.1 Jun 14, 2022
0.1.0 Jun 10, 2022

#305 in Machine learning

Download history 54/week @ 2024-07-27 1/week @ 2024-08-03 40/week @ 2024-09-21 1/week @ 2024-09-28

321 downloads per month
Used in 2 crates

MIT license

15KB
418 lines

MCAI Docker

This crate is a wrapper on bollard crate to enable starting a MCAI worker with Docker.

Usage

use bollard::Docker;
use mcai_docker::McaiDocker;
use std::io::stdout;

#[tokio::main]
async fn main() {
  let docker = Docker::connect_with_socket_defaults().unwrap();
  let mcai_docker = McaiDocker::new(docker);
  mcai_docker
    .run_worker(
      "mcai_worker_image_name",
      &[("KEY1", Box::new("VALUE1"))],
      Some(&mut stdout()),
    )
    .await
    .unwrap();
}

Dependencies

~15–28MB
~416K SLoC