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
- BigQuery —
mlopsdataset with tables for features, predictions, ground truth, and drift metrics
All running on GCP Cloud Run. No servers to manage. Cloud Run services scale to zero when idle. Cloud SQL and BigQuery storage incur baseline cost. See Costs below.
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_GCP_PROJECT_ID
3. Configure
cp config.example.yaml config.yaml
# Edit config.yaml and set your project_id
4. Build images
deployml build-images --create-repo
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, the GCS bucket, and the BigQuery dataset, and also removes the Artifact Registry repo and the Cloud Build staging bucket that build-images created, so a destroyed project leaves no billing residue. Pass --keep-images if other workspaces in the same project share those images. Does not delete the GCP project itself.
Full Tutorial
See docs/tutorials/gcp-cloud-run.md for a step-by-step walkthrough.
Other deployment targets
Cloud Run is the primary, fully supported path. The CLI also supports Kubernetes for users who want a cluster:
- Local minikube, for testing without GCP:
mlflow-initandmlflow-deploy, orminikube-initandminikube-deploy. - GKE on GCP:
gke-cluster-create,gke-init, thengke-deployorgke-apply, torn down withgke-destroy.
MLflow keeps its data on a PersistentVolumeClaim in both, so experiments survive pod restarts. See CLI Commands and the GKE flow notes.
Requirements
- Python 3.11 or newer
gcloudCLI, authenticated withgcloud auth login,gcloud auth application-default login, andgcloud auth configure-docker us-west1-docker.pkg.dev- Docker, running
- Terraform 1.0 or newer
Run deployml doctor --project-id YOUR_GCP_PROJECT_ID to verify auth, ADC, tool versions, enabled APIs, and IAM roles on your project.
Costs
Cloud Run scales to zero when idle. Cloud SQL Postgres and BigQuery storage do not. Expect roughly $30 to $80 per month while the stack is up. MLflow runs with min_instances = 1 by default for snappy UI, which adds about $5 per month. Set min_instances to 0 if you want zero idle cost in exchange for cold starts. Always run deployml destroy when done.
Metadata
Release files for deployml-core 0.0.73
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| deployml_core-0.0.73.tar.gz | 147.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deployml_core-0.0.73-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 339.8 kB
Release files / deployml_core-0.0.73.tar.gz
| Download URL | deployml_core-0.0.73.tar.gz |
|---|---|
| Size | 147.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a489b2004d6b1a16599fc011481113357430ff838ab3e3b1f1ea5b9a4df124f
|
|
BLAKE2b-256 checksum How to use checksums |
2c93de231d446c3d43e9be183f521ddb16607e503ed02f39b52d5e5c2d45d556
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / deployml_core-0.0.73-py3-none-any.whl
| Download URL | deployml_core-0.0.73-py3-none-any.whl |
|---|---|
| Size | 192.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a6bf138524329bc7a368c59666a8665f9696ada2f94ec1af7f58523904f6dfc
|
|
BLAKE2b-256 checksum How to use checksums |
067c8cee429453fb3af77930244a10f171e029ee85427ac9432a7e095612bf91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for deployml-core 0.0.73
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.