File tree Expand file tree Collapse file tree 2 files changed +19
-10
lines changed
Expand file tree Collapse file tree 2 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 11FROM python:3.12-slim-bookworm
22
3- # Install wget, unzip, git, and build tools (needed for compiling packages like matplotlib)
4- RUN apt update && apt install -y \
3+ # Install dependencies, git, and gh cli
4+ RUN apt-get update && apt-get install -y --no-install-recommends \
55 wget \
66 unzip \
77 git \
88 build-essential \
9+ curl \
10+ && curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
11+ && chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
12+ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list \
13+ && apt-get update \
14+ && apt-get install -y gh \
915 && rm -rf /var/lib/apt/lists/*
1016
1117# Install quarto
Original file line number Diff line number Diff line change 11FROM ghcr.io/geocompx/python
22
3- # Install R
3+ # Install R and locales
44RUN apt-get update && apt-get install -y --no-install-recommends \
5- wget \
65 ca-certificates \
76 libcurl4-openssl-dev \
87 libssl-dev \
98 libxml2-dev \
109 libtcl8.6 \
1110 libtk8.6 \
11+ locales \
12+ && locale-gen C.UTF-8 \
1213 && rm -rf /var/lib/apt/lists/*
1314
14- # Set up locale for R installation
15- RUN apt-get update && apt-get install -y locales && locale-gen C.UTF-8 && rm -rf /var/lib/apt/lists/*
1615ENV LANG=C.UTF-8
1716ENV LC_ALL=C.UTF-8
1817
@@ -42,11 +41,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
4241 cmake \
4342 && rm -rf /var/lib/apt/lists/*
4443
44+ # Install ragg and its dependencies for high-quality headless graphics
45+ RUN R -e "install.packages(c('ragg', 'systemfonts', 'textshaping'))"
46+
47+ # Configure R to use ragg as the default graphics device
48+ RUN mkdir -p /etc/R && \
49+ echo "options(repos = c(CRAN = 'https://cloud.r-project.org'))" > /etc/R/Rprofile.site && \
50+ echo "if (requireNamespace('ragg', quietly = TRUE)) { options(device = ragg::agg_png) }" >> /etc/R/Rprofile.site && \
51+ echo 'options(Ncpus = parallel::detectCores())' >> /etc/R/Rprofile.site
4552
46- # Configure rspm
47- RUN mkdir -p /etc/R
48- RUN echo 'options(repos = c(CRAN = "https://packagemanager.rstudio.com/all/latest"))' > /etc/R/Rprofile.site
49- RUN echo 'options(Ncpus = parallel::detectCores())' >> /etc/R/Rprofile.site
5053# Install sf:
5154RUN R -e "install.packages('sf', repos = 'https://cloud.r-project.org')"
5255# Install remotes for GitHub installs:
You can’t perform that action at this time.
0 commit comments