FROM rocker/shiny:latest WORKDIR /code RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ build-essential \ cmake \ git \ python3 \ python3-pip \ libpng-dev \ libjpeg-dev \ libfreetype6-dev \ libharfbuzz-dev \ libfribidi-dev \ libfontconfig1-dev \ libxml2-dev \ libcurl4-openssl-dev \ libssl-dev \ libwebp-dev \ libwebpmux3 \ libwebpdemux2 \ libgit2-dev \ libicu-dev \ libnode-dev \ zlib1g-dev \ && rm -rf /var/lib/apt/lists/* # Install Hugging Face CLI (`hf`) RUN python3 -m pip install --no-cache-dir --break-system-packages "huggingface_hub>=1.5.0,<2" && \ hf --help >/dev/null # Core R packages RUN install2.r --error --skipinstalled \ shiny \ tidyverse \ ggplot2 \ gt \ gtExtras \ gridExtra \ ggforce \ stringr \ lubridate \ zoo \ scales \ shinyjs \ DT \ tidyr \ bonsai \ tidymodels \ hexbin \ ggnewscale \ plotly \ rlang \ rvest \ openintro \ xgboost \ htmltools \ remotes \ RhpcBLASctl \ shapviz # Heavier packages: fail the build if they fail RUN R -q -e "install.packages('arrow', repos='https://cloud.r-project.org')" RUN R -q -e "install.packages('lightgbm', repos='https://cloud.r-project.org')" # V8 must be compiled from source so it links against the libnode-dev we just # installed — the prebuilt binary expects libnode.so.109 which no longer ships. RUN R -q -e "install.packages('V8', repos='https://cloud.r-project.org', type='source')" COPY . /code EXPOSE 7860 CMD ["R", "--quiet", "-e", "shiny::runApp('/code', host='0.0.0.0', port=as.integer(Sys.getenv('PORT', '7860')))"]