This project implements a Continuous Training (CT) and Continuous Deployment (CD) pipeline using GitHub Actions.
Every time a commit is pushed to the repository, the CT workflow is triggered to:
- Train: Run
train/train_model.pyto retrain the model on the latest code/data. - Package: Save the trained model and metadata in the
artifactsdirectory. - Upload: Store the build artifacts for future use or deployment.
Upon successful completion of the training workflow on the main branch, the CD pipeline is automatically triggered to:
- Fetch: Download the freshly trained model artifact.
- Build: Create a Docker image containing the application and the new model.
- Push: Publish the Docker image to the GitHub Container Registry (ghcr.io).
python train/train_model.pypython train/test_predict_model.py --input "[5.1, 3.5, 1.4, 0.2]"python serve/app.pydocker run -p 5001:5001 ghcr.io/vidon/mlops-train-and-serve-model:v0.0.1