Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
85070aa
add graphviz/seisbench & tests
sparafina-earthscope Aug 11, 2026
359c786
changes for 0.2.0 version
sparafina-earthscope Aug 17, 2026
8dbbcf4
added nano, removed seisbench test
sparafina-earthscope Aug 18, 2026
304e9ad
add viz package and test
sparafina-earthscope Aug 20, 2026
4a7e66c
add changelog, update version
sparafina-earthscope Aug 20, 2026
4283c64
Stop overriding manual RELEASE_VERSION with a timestamp
sparafina-earthscope Aug 27, 2026
36821ec
Pass GEOLAB_VERSION build-arg for geolab-base 0.2.0 release
sparafina-earthscope Aug 27, 2026
abbc516
Fail the build if GEOLAB_VERSION is empty
sparafina-earthscope Aug 27, 2026
43b611e
Remove default value for GEOLAB_VERSION build-arg
sparafina-earthscope Aug 27, 2026
9ed1c3f
Document GEOLAB_VERSION build-arg and manual changelog update
sparafina-earthscope Aug 27, 2026
1db849c
update gitlab-ci.yml to set version number by CI
sparafina-earthscope Aug 27, 2026
9ac372a
Merge branch 'main' into geolab-base-0.2.0
sparafina-earthscope Aug 27, 2026
562b655
Make GEOLAB_VERSION a pipeline variable instead of a literal
sparafina-earthscope Aug 27, 2026
2bf0027
Remove default value for GEOLAB_VERSION pipeline variable
sparafina-earthscope Aug 27, 2026
2c39cb9
Document GEOLAB_VERSION as a required GitLab CI pipeline variable
sparafina-earthscope Aug 27, 2026
b42c6e8
fix conflict with gitlab-ci
sparafina-earthscope Aug 27, 2026
0281add
set GEOLAB_VERSION=${IMAGE_VERSION} to set version in image
sparafina-earthscope Aug 27, 2026
59587f4
updated README and test_notebook.ipynb
sparafina-earthscope Sep 17, 2026
5615628
merged README with GeoLab docs Building a Custom Web Image
sparafina-earthscope Sep 18, 2026
4c7c124
Add README2.md: snapshot of geolab-base README from gmt branch
sparafina-earthscope Sep 18, 2026
20accc6
check links, add process image, review text
sparafina-earthscope Sep 18, 2026
f7b27a8
update CHANGELOG
sparafina-earthscope Sep 18, 2026
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
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ include:

.images_matrix:
- DOCKERFILE_RELPATH: "geolab-base"
DOCKER_EXTRA_OPTIONS: "--build-arg IMAGE_AUTHORS=geolab@earthscope.org --build-arg PYTHON_VERSION=3.12"
DOCKER_EXTRA_OPTIONS: "--build-arg IMAGE_AUTHORS=geolab@earthscope.org --build-arg PYTHON_VERSION=3.12 --build-arg GEOLAB_VERSION=${IMAGE_VERSION}"
#- DOCKERFILE_RELPATH: "geolab-gpu"


variables:
CONTAINER_REGISTRY_PLATFORM: "AWS-PUB"
DOCKERFILE_RELPATH_IS_IMAGE_NAME: "true"
GITLAB_HOSTED_RUNNER_SIZE: "saas-linux-medium-amd64"

GEOLAB_VERSION: ""
22 changes: 22 additions & 0 deletions geolab-base/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changelog

All notable changes to this project will be documented in this file.

## [0.2.0]

### Added

- pin base image to pangeo-base:04bb14b
- add geolab-base version as ENV GEOLAB_VERSION (set during CI build)
- add graphviz package
- add pygraphviz package
- add ipycytoscape
- added tests for new packages
- add build_process.png for README

### Changed

- removed test_packages.py
- moved test_notebook functions to test_helpers.py module to make it easier for users to import when writing tests
- updated test_notebook.ipynb to use test_helpers functions
- updated README to match Building Custom Images in docs
13 changes: 10 additions & 3 deletions geolab-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,28 @@
# docker build --platform linux/amd64 \
# --build-arg IMAGE_TITLE=my-geolab-image \
# --build-arg IMAGE_AUTHORS=you@university.edu \
# --build-arg GEOLAB_VERSION=1.0.0 \
Comment thread
sparafina-earthscope marked this conversation as resolved.
# -t my-geolab-image .
# ──────────────────────────────────────────────────────────────
FROM pangeo/base-image:latest
# Changing this tag is a major (breaking) change under semantic versioning.
FROM pangeo/base-image:04bb14b
Comment thread
sarahw-earthscope marked this conversation as resolved.


ARG IMAGE_TITLE="custom-geolab-image" # default if user passes nothing
ARG IMAGE_AUTHORS="NoSpecifiedAuthors" # default if user passes nothing
ARG GEOLAB_VERSION # no default; must be passed with --build-arg

RUN test -n "$GEOLAB_VERSION" || (echo "GEOLAB_VERSION must not be empty" >&2 && exit 1)

LABEL org.opencontainers.image.title="${IMAGE_TITLE}" \
org.opencontainers.image.authors="${IMAGE_AUTHORS}"
org.opencontainers.image.authors="${IMAGE_AUTHORS}" \
org.opencontainers.image.version="${GEOLAB_VERSION}"

# Set locations of PROJ/GDAL resource directories
ENV PROJ_DATA=/srv/conda/envs/notebook/share/proj \
PROJ_LIB=/srv/conda/envs/notebook/share/proj \
GDAL_DATA=/srv/conda/envs/notebook/share/gdal
GDAL_DATA=/srv/conda/envs/notebook/share/gdal \
GEOLAB_VERSION=${GEOLAB_VERSION}

# Default command for standalone use. JupyterHub spawning passes
# its own command (jupyterhub-singleuser), which start respects.
Expand Down
373 changes: 224 additions & 149 deletions geolab-base/README.md
Comment thread
sparafina-earthscope marked this conversation as resolved.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions geolab-base/apt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ git
gmt-dcw
gmt-gshhg
make
nano
Binary file added geolab-base/build_process.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions geolab-base/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ dependencies:
- distributed
# --- Visualization ---
- matplotlib-base
- graphviz
- pygraphviz
- ipycytoscape
- altair
- hvplot
- holoviews
Expand Down
4 changes: 3 additions & 1 deletion geolab-base/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ earthscope-sdk==1.6.1
earthscope-cli==1.2.0
earthscopestraintools


# --- Jupyter add-ons ---
jupyterlab_jupyterbook_navigation

# --- Geophysics ---

41 changes: 41 additions & 0 deletions geolab-base/test_helpers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
"""Helpers for smoke-testing installed packages and CLI tools."""

import importlib
import shutil
import subprocess

RESULTS = []


def reset():
"""Clear RESULTS — call before a fresh run in a long-lived kernel."""
RESULTS.clear()


def py(modname, alias=None, smoke=None):
"""Import `modname` and optionally run `smoke(mod)` as a sanity check."""
label = alias or modname
try:
mod = importlib.import_module(modname)
if smoke is not None:
smoke(mod)
version = getattr(mod, '__version__', '')
RESULTS.append((label, 'OK', str(version), ''))
except Exception as exc:
RESULTS.append((label, 'FAIL', '', f'{type(exc).__name__}: {exc}'))


def cli(cmd, version_flag='--version'):
"""Verify `cmd` is on $PATH and responds to a version flag."""
path = shutil.which(cmd)
if not path:
RESULTS.append((cmd, 'FAIL', '', 'not on $PATH'))
return
try:
r = subprocess.run([cmd, version_flag],
capture_output=True, text=True, timeout=10)
line = (r.stdout or r.stderr).strip().splitlines()
version = line[0] if line else 'on PATH'
RESULTS.append((cmd, 'OK', version[:80], ''))
except Exception as exc:
RESULTS.append((cmd, 'OK', 'on PATH', f'{type(exc).__name__}'))
Loading