Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Martin Dinov
POD
Commits
a1e53743
Commit
a1e53743
authored
2 years ago
by
Szymon Zimnowoda
Browse files
Options
Download
Email Patches
Plain Diff
added gpu support for docker platform
parent
3ef18b2d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libpod/src/db_model.rs
+1
-1
libpod/src/db_model.rs
libpod/src/plugin_run.rs
+4
-0
libpod/src/plugin_run.rs
with
5 additions
and
1 deletion
+5
-1
libpod/src/db_model.rs
+
1
-
1
View file @
a1e53743
...
...
@@ -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]
...
...
This diff is collapsed.
Click to expand it.
libpod/src/plugin_run.rs
+
4
-
0
View file @
a1e53743
...
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment