Docker for beginners
Install Docker once, then run this project’s web workbench and API with one command.
What Docker means here
Docker packages an application and its dependencies into a container: an isolated, ready-to-run environment. Instead of installing this project’s Python packages, Node packages, and web server by hand, Docker starts the same prepared stack for everyone.
For this framework, Compose starts a preparation step, the FastAPI research API, and the Angular web workbench. Your project folder stays on your computer, so generated data, reports, and model.pkl persist after a restart.
1. Install Docker
Use the official installer for your operating system: Get Docker.
- Windows: install Docker Desktop. It normally uses WSL 2; accept the WSL 2 setup prompt if shown.
- macOS: install Docker Desktop and choose the installer for your Mac.
- Linux: install Docker Engine and the Compose plugin using the distribution-specific instructions on Get Docker. Docker Desktop is optional on Linux.
After installation, open Docker Desktop on Windows or macOS and wait until it says Docker is running. On Linux, ensure the Docker service is running before continuing.
2. Check that Docker works
Open Terminal (macOS/Linux) or PowerShell (Windows) and run:
docker --version
docker compose version
Both commands should print version information. This guide uses the current Compose command, docker compose (with a space), not the older docker-compose command.
3. Get and run the project
Download the source code, enter its folder, then build and start the stack:
git clone https://github.com/ranasl62/ehr-chronic-disease-risk-prediction.git
cd ehr-chronic-disease-risk-prediction
docker compose up --build
Leave this terminal open while the stack runs. The first start can take longer because Docker downloads base images and builds the project. When the services are ready, open:
- Workbench: http://127.0.0.1:8080
- API documentation: http://127.0.0.1:8000/docs
To stop the stack, return to that terminal and press Ctrl + C, then run docker compose down.
Use published images instead
If you do not need a local build, Compose can pull the public API and web images from Docker Hub. You still clone the repository because Compose keeps your data and reports in that folder.
git clone https://github.com/ranasl62/ehr-chronic-disease-risk-prediction.git
cd ehr-chronic-disease-risk-prediction
docker compose -f docker-compose.yml -f docker-compose.publish.yml pull
docker compose -f docker-compose.yml -f docker-compose.publish.yml up
See Docker Hub images for image tags and pinning a release. See Quickstart for the first training workflow.
Common problems
- “Cannot connect to the Docker daemon”: start Docker Desktop and wait until it is running; on Linux, start the Docker service.
- Port 8080 or 8000 is already in use: stop the other application, or set
UI_PORTandAPI_PORTin a.envfile before starting Compose. docker composeis unknown: update Docker Desktop or install Docker Engine’s Compose plugin. Avoid switching to olddocker-composecommands unless your installation specifically requires them.- Windows setup fails: Docker Desktop requires WSL 2 for its default Linux-container setup. Follow its WSL 2 prompt, then restart Docker Desktop.
Try it without installing
To explore the interface only, open the hosted live demo. Do not upload patient data.
Free demo server — it may be slow. Check it with a small amount of data. For larger workloads or freer experimentation, run locally or on your own server. Open live demo