Skip to main content

Infra for academia

Project description

deployml

A CLI tool that deploys a production MLOps stack on GCP with a single command. Built for academic ML courses so students can focus on building models, not infrastructure.

What you get

  • MLflow — experiment tracking, artifact storage, and model registry (backed by Cloud SQL Postgres + GCS)
  • FastAPI — model serving endpoint that loads the latest registered model from MLflow automatically
  • Grafana — monitoring dashboard connected to your metrics database
  • BigQuerymlops dataset with tables for features, predictions, ground truth, and drift metrics

All running on GCP Cloud Run — no servers to manage, scales to zero when idle.

Quick Start

1. Install

pip install deployml-core

2. Initialize your GCP project (enables APIs, creates Artifact Registry)

deployml init --provider gcp --project-id YOUR_PROJECT_ID

3. Configure

cp config.example.yaml config.yaml
# Edit config.yaml and set your project_id

4. Build images

deployml build-images

5. Deploy

deployml deploy --verbose

First deploy takes ~20 minutes (Cloud SQL provisioning). Subsequent deploys are 1–2 minutes.

6. Get your URLs

deployml get-urls

Prints service URLs and writes a .env file with MLFLOW_URL, FASTAPI_URL, GRAFANA_URL, BIGQUERY_PROJECT, and BIGQUERY_DATASET.

End-to-End Example

Once deployed, the example/ directory walks through a complete MLOps workflow using a synthetic housing price dataset:

pip install mlflow scikit-learn pandas numpy google-cloud-bigquery db-dtypes python-dotenv requests

python example/scripts/01_load_training_data.py   # load 500 rows into BigQuery
python example/scripts/02_train_model.py           # train RandomForest, log to MLflow
python example/scripts/03_register_model.py        # register model as Production
python example/scripts/04_make_predictions.py      # serve 50 predictions via FastAPI
python example/scripts/05_generate_ground_truth.py # simulate actual outcomes
python example/scripts/06_compute_drift_metrics.py # compute feature drift + MAE
python example/scripts/07_setup_grafana.py         # provision monitoring dashboard

See example/README.md for details.

Teardown

deployml destroy

Deletes all Cloud Run services, Cloud SQL, GCS bucket, and BigQuery dataset. Does not delete Artifact Registry images or the GCP project.

Full Tutorial

See docs/tutorials/gcp-cloud-run.md for a step-by-step walkthrough.

Requirements

  • Python 3.10+
  • gcloud CLI (authenticated)
  • Docker (running)
  • Terraform

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deployml_core-0.0.60.tar.gz (127.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deployml_core-0.0.60-py3-none-any.whl (172.9 kB view details)

Uploaded Python 3

File details

Details for the file deployml_core-0.0.60.tar.gz.

File metadata

  • Download URL: deployml_core-0.0.60.tar.gz
  • Upload date:
  • Size: 127.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for deployml_core-0.0.60.tar.gz
Algorithm Hash digest
SHA256 de32526245016cde477ac010259b24d498430e9d411a3a7c0329e8e1ff096f63
MD5 90531977d6af08d998598e67b412ade9
BLAKE2b-256 ad6b58c43d12f72dd40c61cfcfb2c29e54bff60d5982c5e647603bdff421b187

See more details on using hashes here.

File details

Details for the file deployml_core-0.0.60-py3-none-any.whl.

File metadata

  • Download URL: deployml_core-0.0.60-py3-none-any.whl
  • Upload date:
  • Size: 172.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for deployml_core-0.0.60-py3-none-any.whl
Algorithm Hash digest
SHA256 84f13c6fc57945bcf5530ea06c0b07467263479c4640d7899ed2dcd0b08c2b3d
MD5 fa49a755aad619ae3932c5a1ffc4140d
BLAKE2b-256 87e4aef87fe336d06af74d88008a0fd7e6b23b08f634b097533fca0a52488144

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page