Commit a1e53743 authored by Szymon Zimnowoda's avatar Szymon Zimnowoda
Browse files

added gpu support for docker platform

parent 3ef18b2d
Showing with 5 additions and 1 deletion
+5 -1
......@@ -51,7 +51,7 @@ pub struct PluginRunItem {
pub execute_on: PluginExecutionPlatform,
}
#[derive(Deserialize, Debug, Default)]
#[derive(Deserialize, Debug, Default, PartialEq)]
#[serde(rename_all = "camelCase")]
pub enum PluginExecutionPlatform {
#[default]
......
......@@ -211,6 +211,10 @@ fn run_docker_container(
args.extend_from_slice(&["--label".to_string(), format!("{UNIQUE_ID}={unique_id}")]);
}
if plugin.execute_on == PluginExecutionPlatform::Gpu {
args.extend_from_slice(&["--gpus=all".to_string()]);
}
args.extend_from_slice(&["--".to_string(), plugin.container_image.clone()]);
let envs: HashMap<&str, &str> = HashMap::new();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment