Skip to content

Add Docker one-command demo (issue #4) - #11

Open
hnet158158 wants to merge 2 commits into
mshojaei77:mainfrom
hnet158158:gfi/4-docker-demo
Open

Add Docker one-command demo (issue #4)#11
hnet158158 wants to merge 2 commits into
mshojaei77:mainfrom
hnet158158:gfi/4-docker-demo

Conversation

@hnet158158

@hnet158158 hnet158158 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

What this PR does

Adds a Docker-based one-command demo that runs both the FastAPI backend and the Streamlit review UI with the sample corpus.

Closes #4

Files added / changed

Dockerfile (new)

Multi-stage build using uv for fast dependency installation:

Stage CMD Description
base System deps (OpenCV/GL), copies uv.lock, installs third-party deps, copies source + README, installs project
api uvicorn FastAPI server on :8000
ui streamlit Streamlit review UI on :8501

docker-compose.yml (updated from empty stub)

  • api — FastAPI, port 8000, healthchecked
  • ui — Streamlit, port 8501, depends on api healthy
  • Both mount ./samples and ./data as volumes

.dockerignore (new)

Skips dev/cache/docs (except README.md needed by hatchling) from build context.

Usage

docker compose up

Then open:

Validation ✅

Check Result
docker build --target base ✅ Pass
docker build --target api ✅ Pass
docker build --target ui ✅ Pass
docker compose up — API responds 200 on /docs ✅ Pass
docker compose up — UI responds 200 on / ✅ Pass
API healthcheck passes ✅ Pass

- Dockerfile: multi-stage (base → api/ui), uses uv for fast install
- docker-compose.yml: two services (api + ui) with healthcheck
- .dockerignore: exclude dev/cache/docs from build context

One-command: docker compose up
Starts FastAPI at :8000 and Streamlit UI at :8501
- libgl1-mesa-glx → libgl1 (Debian Bookworm renamed)
- Add COPY README.md ./ before uv sync (hatchling requires it)
- Verified: docker build --target api + ui both succeed
- Verified: docker compose up — both API (:8000) and UI (:8501) respond 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

good first issue: add Docker one-command demo

1 participant