Skip to content

Commit 187a577

Browse files
committed
Add pythonr image, close geocompx#110
1 parent 458a42e commit 187a577

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

pythonr/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM python:3.13-slim-bookworm
2+
3+
# Install R
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
wget \
6+
ca-certificates \
7+
libcurl4-openssl-dev \
8+
libssl-dev \
9+
libxml2-dev \
10+
libtcl8.6 \
11+
libtk8.6 \
12+
&& rm -rf /var/lib/apt/lists/*
13+
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/*
16+
ENV LANG=C.UTF-8
17+
ENV LC_ALL=C.UTF-8
18+
19+
RUN wget https://github.com/rocker-org/rocker-versioned2/raw/refs/heads/master/scripts/install_R_source.sh
20+
RUN bash install_R_source.sh
21+
22+
# Configure rspm
23+
RUN mkdir -p /etc/R
24+
RUN echo 'options(repos = c(CRAN = "https://packagemanager.rstudio.com/all/latest"))' > /etc/R/Rprofile.site
25+
RUN echo 'options(Ncpus = parallel::detectCores())' >> /etc/R/Rprofile.site
26+
# Install geocompx:
27+
RUN R -e "install.packages('geocompkg', upgrade = TRUE, dependencies = TRUE, force = TRUE, repos = c('https://geocompr.r-universe.dev', 'https://mlr-org.r-universe.dev', 'https://cloud.r-project.org'))"
28+

0 commit comments

Comments
 (0)