Shiny R in Hugging Face: compile error

Hello.

My question is not strictly about the execution of a particular code.

I am trying to use my shiny app with R and host it on Hugging Face, however I am finding that the template (shiny-for-r-template) is not working correctly. I don't know if it's a bslib problem, because this other app (shiny-kmeans) works without problem. I've tried several solutions, but the build fails when deployed to the Hugging Face space. It is worth mentioning that locally it works correctly.

I really appreciate the community's help with this issue.

Greetings.

It works now!

I fixed the problem by editing the Dockerfile. Initially it was like this:

FROM rocker/shiny-verse:latest

WORKDIR /code

# Install stable packages from CRAN
RUN install2.r --error \
    ggExtra \
    shiny

# Install development packages from GitHub
RUN installGithub.r \
    rstudio/bslib \
    rstudio/httpuv

COPY . .

CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]

I edited it to not have libraries installed with the development version:

FROM rocker/shiny-verse:latest

WORKDIR /code

# Install stable packages from CRAN
RUN install2.r --error \
    ggExtra \
    shiny \
    bslib  \
    httpuv 

COPY . .

CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.