FROM rocker/shiny-verse:latest WORKDIR /code # Install stable packages from CRAN RUN install2.r --error \ ggExtra \ shiny \ callr # Install Rust for tok RUN apt-get -y update && \ apt-get -y install curl && \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y # Install development packages from GitHub ENV TORCH_INSTALL=1 RUN installGithub.r \ rstudio/bslib \ rstudio/httpuv \ mlverse/tok RUN installGithub.r \ mlverse/minhub \ mlverse/hfhub \ mlverse/callq # see: https://huggingface.co/docs/hub/spaces-sdks-docker#permissions RUN useradd -m -u 1000 user USER user ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH WORKDIR $HOME COPY --chown=user . . CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]