try to move cache dir again

This commit is contained in:
Brandon Thomas committed 2023-04-09 01:46:37 -07:00
1 parent 413960b6cf
commit 061c2c7b07
2 files changed
+6 -3

No files matched your search

@@ -38,4 +38,5 @@ VITS_MODEL_CHECK_MAYBE_DOCKER_IMAGE="1e2357c3c154"
# Huggingface caches data at ~/.cache/huggingface (/root/cache/huggingface),
# which isn't the shared volume and will get blown away.
# HF_HOME="/tmp/huggingface"
HF_DATASETS_CACHE="/tmp/huggingface"
@@ -137,9 +137,11 @@ impl VitsInferenceCommand {
let mut config = PopenConfig::default();
if let Some(cache_dir) = self.maybe_huggingface_cache_dir.as_deref() {
let name = OsString::from("HF_DATASETS_CACHE");
let value = OsString::from(cache_dir);
config.env = Some(vec![(name, value)])
config.env = Some(vec![
// NB: Docs point to `HF_DATASETS_CACHE`, but the lib code references `HF_HOME`.
(OsString::from("HF_DATASETS_CACHE"), OsString::from(cache_dir)),
(OsString::from("HF_HOME"), OsString::from(cache_dir)),
])
}
let mut p = Popen::create(&command_parts, PopenConfig {