geocompx / geocompx/docker

Add libglpk, tippecanoe, and PPM binary R installs to devcontainer postCreate

Open
#119 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Dockerfile
Stars
50
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Background

While setting up the criticalissues devcontainer for an Oxfordshire road safety pipeline, we hit several missing system dependencies and slow install patterns. The fixes are small but meaningfully improve the out-of-the-box experience for anyone doing spatial / road-network R work in this container.

Proposed additions to postCreate.sh (or equivalent)

1. System packages
apt-get install -y libglpk-dev libglpk40 xz-utils

libglpk is required by CRAN packages such as igraph and glmmTMB. Without it, those packages either fail to install or produce a runtime error. xz-utils is needed for decompressing certain OS data archives.

2. tippecanoe (vector tile generation)
if ! command -v tippecanoe &> /dev/null; then
    git clone https://github.com/felt/tippecanoe.git
    cd tippecanoe && make -j && make install && cd ..
    rm -rf tippecanoe
fi

tippecanoe is the standard tool for building PMTiles / MBTiles from GeoJSON. It is not in apt and must be built from source. Adding it here avoids every project having to document this step.

3. Posit Package Manager (PPM) binary R installs
options(repos = c(PPM = "https://packagemanager.posit.co/cran/__linux__/bookworm/latest"))

Setting this as the default repo for Bookworm containers turns 20–30 minute source builds of packages like sf, duckdb, brms into ~2-minute binary installs. This is the single highest-leverage change for dev container startup time.

Reference implementation

A working postCreate.sh using all three improvements can be found in:
https://github.com/Robinlovelace/criticalissues/blob/ox-generalisable/.devcontainer/postCreate.sh

Happy to submit a PR if the approach fits the repo's structure.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the repository's devcontainer configuration and locate postCreate.sh or its equivalent, then compare it with the linked criticalissues reference implementation. Validate the dependency setup by building the container and checking that tippecanoe and the requested R packages can install using the proposed system packages and Posit Package Manager repository.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, docker, git, r
Domain
devops, infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.