Medical-Triage / DEPLOYMENT.md
Mahakii's picture
Finalize strict grader discovery and stabilize RL checkpoint loading
802da30

Deployment Guide

Prerequisites

  • Docker installed and running
  • Optional: kubectl configured for your cluster
  • Repository root contains Dockerfile

1) Local Run

docker build -t medicaltriage:latest .
docker run --rm -p 8000:8000 --env-file .env medicaltriage:latest

Health check:

curl -fsS http://127.0.0.1:8000/health

2) Docker Compose

docker compose up --build -d

3) Push to Docker Hub

Set credentials:

export DOCKERHUB_USERNAME=<your-user>
export DOCKERHUB_TOKEN=<your-token>

Push image:

./scripts/deploy_dockerhub.sh latest

4) Push to GitHub Container Registry (GHCR)

Set credentials:

export GHCR_USERNAME=<github-user-or-org>
export GHCR_TOKEN=<github-token-with-package-write>

Push image:

./scripts/deploy_ghcr.sh latest

5) Deploy to Kubernetes

Apply manifests and set image:

IMAGE=<registry/image:tag> ./scripts/deploy_k8s.sh

Default manifests:

  • deployment/k8s/deployment.yaml
  • deployment/k8s/service.yaml

6) Manual Readiness Check

Run local tests and image build before release:

python -m pytest -q
docker build -t medicaltriage:ci .