Open F041 opened 1 month ago
If you are using a Dockerfile for Hugging Face spaces, I would probably use ARG
as a way to set the PINS_CACHE_DIR
environment variable: https://docs.docker.com/build/building/variables/#arg-usage-example
In #822 I showed using base::tempdir()
but the goal here is to set the cache to somewhere that you have permission to write to on Hugging Face, like /tmp
.
I asked help to GPT with your input, since I did another attempt that failed: https://chatgpt.com/share/b1527fa1-43f5-45b1-b612-bc16050ce253 At first I got a permission denied related to b <- board_folder(path = "pins-r"), in the file plumber.R, then I changed that path to tmp and I still get:
Error on line #7: '' - Error: [EACCES] Failed to make directory 'tmp': permission denied
Calls: <Anonymous> ... tryCatchList -> tryCatchOne -> <Anonymous> -> stopOnLine
Execution halted
I see some progress though.
As for: https://github.com/rstudio/pins-r/issues/822#issuecomment-2093381329 sorry, I think I didn't quite understand where to insert that. If I do it in script. R, I get the same error