Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
text-generation-inference
Commits
cea6051e
Commit
cea6051e
authored
Nov 04, 2022
by
OlivierDehaene
Browse files
feat(launcher): Pass CUDA_VISIBLE_DEVICES to the shard
parent
427d7cc4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
launcher/src/main.rs
launcher/src/main.rs
+8
-0
No files found.
launcher/src/main.rs
View file @
cea6051e
...
@@ -306,6 +306,14 @@ fn shard_manager(
...
@@ -306,6 +306,14 @@ fn shard_manager(
));
));
};
};
// If the CUDA_VISIBLE_DEVICES env var is set, pass it to the shard
if
let
Ok
(
cuda_visible_devices
)
=
env
::
var
(
"CUDA_VISIBLE_DEVICES"
)
{
env
.push
((
"CUDA_VISIBLE_DEVICES"
.parse
()
.unwrap
(),
cuda_visible_devices
.parse
()
.unwrap
(),
));
};
// Start process
// Start process
tracing
::
info!
(
"Starting shard {}"
,
rank
);
tracing
::
info!
(
"Starting shard {}"
,
rank
);
let
mut
p
=
match
Popen
::
create
(
let
mut
p
=
match
Popen
::
create
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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