[Success Story] Streamlit x GHCR x CI/CD
Tl;DR
Not a post about IQVIA nor FMCG, nor D&A tech stack for healthcare analytics.
But one to make the development operations more efficient for a PHD team in a hospital.
Intro
It all comes down to doing + sharing/helping.
Even better if you do so around a well defined offer, so people know what to expect.
SelfHosted Landing Repo
DIY webs via webookIn this case, it has been a success story based on github actions x containers best practices
What we have done:
Define the problem
Solution proposal: container image versioning and automatic creation
Defining the workflow config: https://github.com/jlleongarcia/X-ray-imaging-analysis/commit/2a2eb68132834b39ce8ff3e9e77e8d7d87e801b5
Making a manual test run towards v1.0: https://github.com/jlleongarcia/X-ray-imaging-analysis/actions/runs/20484822267/job/58865117916 which was before like so
- Enabling the public ghcr artifacts to public to share within other hospitals: https://github.com/jlleongarcia/X-ray-imaging-analysis/pkgs/container/x-ray-imaging-analysis
Its also recommended to provide a docker-compose for users who want to build their own image:
version: '3.8'
services:
streamlit-app:
# Build context points to the current directory (where this file lives)
build:
context: .
dockerfile: Dockerfile
container_name: X-ray-imaging-analysis
restart: unless-stopped
ports:
- "8502:8502"
# Define the healthcheck to ensure the container is truly ready for the tunnel
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8502"]
interval: 30s
timeout: 10s
retries: 3And one for the ones that just want to pull a particular already built image version with certain features:
docker pull ghcr.io/jlleongarcia/x-ray-imaging-analysis:v1.0version: '3.8'
services:
streamlit-app:
image: ghcr.io/jlleongarcia/x-ray-imaging-analysis:v1.0 #this one is already build, you just pull it (and run it)
container_name: x-ray-imaging-analysis
restart: unless-stopped
ports:
- "8502:8502"
# Define the healthcheck to ensure the container is truly ready for the tunnel
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8502"]
interval: 30s
timeout: 10s
retries: 3sudo docker stats x-ray-imaging-analysisOn my latest projects, I try to differenciate the docker-compose for:
- Development: which builts the image locally
- For Production: which just pull a particular image version with certain features
- With NGINX/Cloudflare tunnel - which i tend to call portainer version
- With Traefik - which i tend to call traefik version
Conclusions
We started out with the framework: Whats working, whats not and whats next?
The problem was clearly the way of shipping the code to production and the maintanability/ trazability of the versions.
Thats where bringing the CI/CD strategy to their software methodology with the containers automated built method was a game changer.
Among al CI/CD Tools and processes: we went with a focus on the CI part via github actions.
Fixing their bottleneck and major pain point with their operations and maintainance.
Regarding the what’s next: I recommended to have a look for automated SSL certificates for their internal domain.
Knowing how to control infrastructure (servers/homelab) and providing SSL/https is a must.
Healthcare Analytics is a broad field, and it can be applied to many different areas of healthcare:
mindmap
root((Medical Physics))
Radiotherapy
Linac QA
Patient Treatment
3D CRT
IMRT
VMAT
Nuclear Medicine
Patient Treatment
Radiopharmaceuticals
Patient Diagnostic
Radiotracers
Machine QA
Diagnostic Radiology
Machine QA
Diagnose
Clinical Image Validation
Radiation Protection
Patient Treatment & Diagnose
ALARA criteria
Workers & Public Protection
Time
Distance
ShieldingPowered by the start doing section of last year: Collect case studies / success stories: Flask web app https on a server for SMB / real estate DFY w custom chatbot / hospital D&A CI/CD radiophysics / from zero to astro web hero for a mechanical engineer…and add them to the consulting.jalcocer and/or as article on the main www site.
The success story has been recorded here
Be the next one to get a x10 workflow improvement:
Consulting Services
The power to DIY - via ebooksFAQ
Latest features shipped properly: https://github.com/JAlcocerT/X-ray-imaging-analysis + youtube video
Health Care Analytics - https://github.com/tuva-health
Main repo including core data model, data marts, reference data, terminology, and the clinical concept library
