Skip to content

Reproducible environment with Docker#119

Open
Sammyjoseph999 wants to merge 7 commits into
mainfrom
feat/docker-reproducible-env
Open

Reproducible environment with Docker#119
Sammyjoseph999 wants to merge 7 commits into
mainfrom
feat/docker-reproducible-env

Conversation

@Sammyjoseph999

Copy link
Copy Markdown
Collaborator

Adds a Docker path so any user can reproduce an identical runtime environment, independent of their local Python version.

What

  • Dockerfile — multi-stage, uv-based, non-root, CPython 3.10 (matches CI). Reproducibility comes from three pins: base image pinned by digest, uv pinned to an exact release (0.11.28), and uv.lock (every dependency fixed to exact version + hash). Dependency layer is cached separately from source for fast rebuilds.
  • .dockerignore — keeps the build context small/deterministic (installs from pyproject.toml + uv.lock).
  • docker-compose.yml — wraps the Earth Engine credential mount, GCP_PROJECT_ID, and outputs/ volume.
  • README — new "Reproducible environment with Docker" section.

Design notes

  • Earth Engine credentials are not baked into the image (per-user OAuth). They mount read-only at /home/app/.config/earthengine at runtime; GCP_PROJECT_ID is a runtime env var. The offline surface (import, --help, unit suite, NASA POWER) needs neither.
  • Base image pinned by digest so the OS layer is reproducible over time, not just today.
  • Respects existing runtime conventions (env-var config, outputs/cache/...).

Verification (built and run locally)

  • docker build succeeds with no compiler (all deps resolve to manylinux cp310 wheels).
  • docker run --rm climate-toolkit --help lists all subcommands.
  • Import + version check passes inside the container.
  • Container runs as non-root (uid 1000).

@Sammyjoseph999
Sammyjoseph999 requested a review from bjyberg July 8, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant