Closed eduardofv closed 3 years ago
Thanks for reporting ! You can override the directory in which cache file are stored using for example
ENV HF_HOME="/root/cache/hf_cache_home"
This way both transformers
and datasets
will use this directory instead of the default .cache
Great, thanks. I didn't see documentation about than ENV variable, looks like an obvious solution.
Thanks for reporting ! You can override the directory in which cache file are stored using for example
ENV HF_HOME="/root/cache/hf_cache_home"
This way both
transformers
anddatasets
will use this directory instead of the default.cache
can we disable caching directly?
Hi ! Unfortunately no since we need this directory to load datasets.
When you load a dataset, it downloads the raw data files in the cache directory inside
However you can specify the directory of your choice, and it can be a temporary directory if you want to clean everything up at one point.
I'm closing this to keep issues a bit cleaner
I am using a docker container, based on latest tensorflow-gpu image, to run transformers and datasets (4.0.1 and 1.1.3 respectively - Dockerfile attached below). Importing transformers throws a Permission Error to access
/.cache
:I've pinned the problem to
RUN pip install datasets
, and by commenting it you can actually import transformers correctly. Another workaround I've found is creating the directory and giving permissions to it directly on the Dockerfile.