feat: add option to use local sdr-docker image - #39
Conversation
hunterhubble
commented
Jun 11, 2026
- Set the SDR_DOCKER_IMAGE to the name of the container on the local machine and pyhubblenetwork sat scan will use that instead of latest.
- Helpful for development and CI with changes to sdr-docker. Now we can do CI runs on PRs from sdr-docker before they become a part of the latest image
|
Coincides with PRs to sdr-docker and hubble-satnet-decoder: |
f2eac0f to
1e10264
Compare
HongNguyen635
left a comment
There was a problem hiding this comment.
Minor comment but imo, since this is a public repo, we shouldn't mentioned Jira / Confluence content here. A commit message should be enough to self-justify the change.
| Skips the pull if the image exists only locally (e.g. a locally-built tag | ||
| with no remote registry counterpart). | ||
| """ | ||
| if _image_exists_locally(image): |
There was a problem hiding this comment.
I feel like there's a bit of circular in here. So scan call pull_image, which then call _image_exists_locally, which then call _get_client(). But the later part of this pull_image also calls get client.
There was a problem hiding this comment.
I see the redundancy here, will fix
| logger = logging.getLogger(__name__) | ||
|
|
||
| DOCKER_IMAGE = "ghcr.io/hubblenetwork/sdr-docker:latest" | ||
| DOCKER_IMAGE = os.environ.get("SDR_DOCKER_IMAGE", "ghcr.io/hubblenetwork/sdr-docker:latest") |
There was a problem hiding this comment.
should we update the doc / user guide? Is this env set by the program or by user?
There was a problem hiding this comment.
That's a fair point. I didn't have the end-user in mind when making this, I was only thinking about how to integrate this into CI with new versions of sdr-docker before it gets updated into latest. I personally don't think we should advise the user to change our sdr-docker and use pyhubblenetwork with it, ideally they should only be using latest because that is what's validated.
1e10264 to
c7d6b1b
Compare
| """Pull *image*, ensuring the latest version is fetched. | ||
|
|
||
| Skips the pull if the image exists only locally (e.g. a locally-built tag | ||
| with no remote registry counterpart). | ||
| """ |
There was a problem hiding this comment.
since there is no change to pull_image, we should keep the doc comment the same right?
c7d6b1b to
95e590f
Compare
95e590f to
734eab9
Compare
- Set the SDR_DOCKER_IMAGE to the name of the container on the local machine and pyhubblenetwork sat scan will use that instead of latest. - Helpful for development and CI with changes to sdr-docker. Now we can do CI runs on PRs from sdr-docker before they become a part of the latest image Signed-off-by: Hunter Patchett <hunter@hubble.com>
734eab9 to
5415d4b
Compare