FROM rocker/r2u:latest WORKDIR /code # System dependencies + Python (needed by reticulate for the Hugging Face # upload step in the Scraping tab) RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ libcurl4-openssl-dev \ libssl-dev \ libxml2-dev \ libmagick++-dev \ python3 \ python3-pip \ python3-dev \ libpython3-dev \ && rm -rf /var/lib/apt/lists/* # huggingface_hub for the dataset upload feature RUN pip3 install huggingface_hub --break-system-packages # Tell reticulate which Python to use ENV RETICULATE_PYTHON=/usr/bin/python3 # Heavy R packages (cached separately so they don't rebuild often) RUN install2.r --error --skipinstalled \ arrow \ xgboost \ recipes \ workflows \ parsnip \ tidymodels # Lighter R packages (this layer rebuilds if you add/remove packages) RUN install2.r --error --skipinstalled \ shiny \ shinyBS \ DT \ dplyr \ ggplot2 \ gridExtra \ stringr \ readr \ zip \ png \ jsonlite \ httr \ ggforce \ magick \ reticulate # Copy app files (changes here won't trigger package reinstall) COPY . . EXPOSE 7860 CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]