Hello,
I have a personal project for which I would like to use this a tool called PhacochR.
I managed to run and test it locally with R, but I need this to be available even when my laptop is closed.
For this, I wanted to use a HuggingFace space and I made this space : ApiPhacochR - a Hugging Face Space by totonicknick
I started up a blank docker space with the free tier resources and added 2 files (after several iterations with gemini 2.5 to try to resolve my issues, both can be found in https://huggingface.co/spaces/totonicknick/apiPhacochR/resolve/main) :
- Dockerfile
- api.R
After several iterations with the help of gemini-2.5, I still can’t make it work due to a runtime error.
This is the explanation according to Gemini-2.5-Pro, but doing a factory reset did not help one bit and I’m too much of a beginner to know what to do next.
The launch is timing out because of a subtle configuration issue.
Your build logs show that even with the correct Dockerfile, the data for the phacochr package is being installed in the wrong place. This means that when the application tries to run, it can’t find its necessary files and eventually times out.
The Problem in the Logs
The key piece of evidence is this line from your build log:
✔ Création du dossier : ~/.local/share/phacochr/data_phacochr
This line confirms that the phacochr package is ignoring the ENV PHACOCHR_DATA_DIR variable and installing data to its default user directory. The application then fails at runtime because it can’t find this data.
This situation is unusual and suggests that the build environment might be ignoring the ENV variable or there’s a caching issue.
The Solution
The most robust solution is to force a clean rebuild of your application. You can do this by using the “Factory reboot” option in your Hugging Face Space settings. This will clear any persistent storage or cache and force the build process to run from a completely clean state.
Here’s what to do:
-
Go to the Settings tab of your Space.
-
Scroll down to the bottom of the page.
-
Click the “Factory reboot” button. This will trigger a completely new build.
After the reboot, monitor the new build logs. You should see the installation path change to /opt/phacochr/data. If it does, your application will have the data it needs and should start correctly.