Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ jobs:
type=raw,value=latest,enable=${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
type=raw,value={{date 'YYYY-MM-DD'}},enable=${{ github.event_name == 'schedule' }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
uses: docker/login-action@v3
with:
registry: ghcr.io
Expand Down
8 changes: 6 additions & 2 deletions python/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
ARG PYTHON_BASE_IMAGE=python:3.12-slim-trixie
ARG PYTHON_BASE_IMAGE=python:3.14-slim-trixie
FROM ${PYTHON_BASE_IMAGE}

ARG QUARTO_VERSION=1.11.9

LABEL devcontainer.metadata='[{"customizations":{"vscode":{"extensions":["quarto.quarto","ms-python.python","ms-toolsai.jupyter"],"settings":{"python.defaultInterpreterPath":"/usr/local/bin/python"}}}}]'

ENV QUARTO_PYTHON="/usr/local/bin/python" \
RETICULATE_PYTHON="/usr/local/bin/python"

# Install dependencies, git, and gh cli
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
Expand Down Expand Up @@ -32,7 +35,8 @@ RUN arch="$(dpkg --print-architecture)" \
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/

# Install requirements using uv for fast parallel wheel resolution
RUN wget -q -O /tmp/requirements.txt https://raw.githubusercontent.com/geocompx/py/main/requirements.txt \
RUN wget -q -O /tmp/requirements.txt https://raw.githubusercontent.com/geocompx/geocompy/main/requirements.txt \
&& sed -i 's/==/>=/g' /tmp/requirements.txt \
&& uv pip install --system --no-cache -r /tmp/requirements.txt seaborn openpyxl statsmodels pyarrow \
&& rm /tmp/requirements.txt

Expand Down
11 changes: 6 additions & 5 deletions pythonr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ RUN . /etc/os-release && \
&& ln -sfn /opt/R/current/bin/Rscript /usr/local/bin/Rscript \
&& rm -rf /tmp/r.deb /var/lib/apt/lists/*

ENV PATH="/opt/R/current/bin:${PATH}"

# Make Python visible on standard path for R's reticulate
RUN update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python 10
ENV PATH="/opt/R/current/bin:/usr/local/bin:${PATH}" \
QUARTO_PYTHON="/usr/local/bin/python" \
RETICULATE_PYTHON="/usr/local/bin/python"

# Configure Rprofile.site and /root/.Rprofile with P3M binary repository and HTTPUserAgent
# so both pak and base install.packages() receive precompiled Linux binary packages from P3M
Expand All @@ -62,4 +61,6 @@ RUN R -e "install.packages('pak')"
# Install geocompkg (including Suggests) + VS Code R extension (vscode-R v3+) dependencies
# using pak so system requirements and precompiled P3M/r-universe binaries are resolved in parallel
RUN Rscript -e "options(repos = c(geocompx = 'https://geocompx.r-universe.dev', mlrorg = 'https://mlr-org.r-universe.dev', getOption('repos'))); pak::pak(c('sf', 'geocompkg', 'languageserver', 'httpgd', 'jgd', 'rstudioapi', 'processx', 'ps', 'later', 'jsonlite', 'svglite', 'reticulate'), dependencies = TRUE)" && \
rm -rf /tmp/* /root/.cache/R/pkgcache
ln -sf /usr/local/bin/python /usr/bin/python3 && \
ln -sf /usr/local/bin/python /usr/bin/python && \
rm -rf /tmp/* /root/.cache/R/pkgcache /var/lib/apt/lists/*
5 changes: 4 additions & 1 deletion rocker-rpy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@ ENV QUARTO_PYTHON=/usr/bin/python
# The `--break-system-packages` flag is added to override the security feature.
# The `--ignore-installed` flag is added to prevent pip from trying to uninstall
# packages that are managed by the system.
RUN pip3 install --no-cache-dir --break-system-packages --ignore-installed -r https://github.com/geocompx/geocompy/raw/refs/heads/main/requirements.txt
RUN wget -q -O /tmp/requirements.txt https://github.com/geocompx/geocompy/raw/refs/heads/main/requirements.txt \
&& sed -i 's/==/>=/g' /tmp/requirements.txt \
&& pip3 install --no-cache-dir --break-system-packages --ignore-installed -r /tmp/requirements.txt \
&& rm /tmp/requirements.txt
Loading