tutorial code for model registry
-
Run model registry with docker compose command
docker compose -f docker/model-registry/docker-compose.yaml up -d
-
Check whether you can access your model registry: http://localhost:5001
-
Install packages:
pip install -r src/requirements.txt
-
Train model through script you can choose scikit-learn native model or pyfunc custom model
-
scikit-learn model
python src/train.py
-
pyfunc custom model
python src/train_custom_model.py
-
-
Check your run id from model registry and download model.
python docker/api-serving/download_model.py --run-id <YOUR_RUN_ID_HERE>
-
Build docker image.
docker build ./docker/api-serving -f ./docker/api-serving/Dockerfile -t api-serving:latest
-
Run your image.
docker run -p 8000:8000 api-serving:latest
-
Check your swagger: http://localhost:8000