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
b67908e0
Unverified
Commit
b67908e0
authored
May 03, 2023
by
OlivierDehaene
Committed by
GitHub
May 03, 2023
Browse files
fix(launcher): pass weights cache override to the download process (#274)
closes #273
parent
85aa7e2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
launcher/src/main.rs
launcher/src/main.rs
+10
-1
No files found.
launcher/src/main.rs
View file @
b67908e0
...
...
@@ -542,7 +542,7 @@ fn download_convert_model(
// Copy current process env
let
mut
env
:
Vec
<
(
OsString
,
OsString
)
>
=
env
::
vars_os
()
.collect
();
// If huggingface_hub_cache is set, pass it to the
shard
// If huggingface_hub_cache is set, pass it to the
download process
// Useful when running inside a docker container
if
let
Some
(
ref
huggingface_hub_cache
)
=
args
.huggingface_hub_cache
{
env
.push
((
"HUGGINGFACE_HUB_CACHE"
.into
(),
huggingface_hub_cache
.into
()));
...
...
@@ -560,6 +560,15 @@ fn download_convert_model(
env
.push
((
"HUGGING_FACE_HUB_TOKEN"
.into
(),
api_token
.into
()))
};
// If args.weights_cache_override is some, pass it to the download process
// Useful when running inside a HuggingFace Inference Endpoint
if
let
Some
(
weights_cache_override
)
=
&
args
.weights_cache_override
{
env
.push
((
"WEIGHTS_CACHE_OVERRIDE"
.into
(),
weights_cache_override
.into
(),
));
};
// Start process
tracing
::
info!
(
"Starting download process."
);
let
mut
download_process
=
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