Skip to content

Commit 3181a68

Browse files
committed
Add ability to set SBEDP image by envar, sets default to "latest"
1 parent 1a8304e commit 3181a68

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

docs/running.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ It is always safe to interrupt/kill the python process with a {kbd}`control` + {
2828
There is significant caching of intermediate results and the QA process should quickly catch up to where it left off.
2929
:::
3030

31+
### ENVVARs
32+
#### `R2R_CTD_SBEDP_IMAGE`
33+
The image config can also be controlled via the `R2R_CTD_SBEDP_IMAGE` envvar for using a specific version or for local testing:
34+
To use a previous version of the published image you could run the command:
35+
```
36+
R2R_CTD_SBEDP_IMAGE="ghcr.io/cchdo/sbedp:v2025.07.1" uvx r2r-ctd qa
37+
```
38+
or if using a locally built image tag ("testbuild" in this example):
39+
```
40+
R2R_CTD_SBEDP_IMAGE="testbuild" uvx r2r-ctd qa
41+
```
42+
3143
### Switches
3244
#### Quiet `-q`
3345
The verbosity of the logging can be controlled by adding one or more `-q` flags after the `r2r-ctd` but _before_ the `qa` subcommand.

src/r2r_ctd/docker_ctl.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
from collections.abc import Mapping
4343
from functools import wraps
4444
from logging import getLogger
45+
from os import environ
4546
from pathlib import Path
4647
from tempfile import TemporaryDirectory
4748
from typing import cast
@@ -58,7 +59,9 @@
5859
from r2r_ctd.sbe import batch
5960
from r2r_ctd.state import NamedBytes
6061

61-
SBEDP_IMAGE = "ghcr.io/cchdo/sbedp:v2025.07.1"
62+
DEFAULT_SBEDP_IMAGE = "ghcr.io/cchdo/sbedp:latest"
63+
SBEDP_IMAGE = environ.get("R2R_CTD_SBEDP_IMAGE", DEFAULT_SBEDP_IMAGE)
64+
6265
"""The current image that will be downloaded/used for the processing"""
6366

6467
logger = getLogger(__name__)

0 commit comments

Comments
 (0)