deployml-core 0.0.60__tar.gz → 0.0.67__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {deployml_core-0.0.60 → deployml_core-0.0.67}/PKG-INFO +24 -9
- {deployml_core-0.0.60 → deployml_core-0.0.67}/README.md +23 -8
- {deployml_core-0.0.60 → deployml_core-0.0.67}/pyproject.toml +5 -8
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/api.py +13 -12
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/cli/cli.py +794 -316
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/diagnostics/doctor.py +22 -9
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/docker/fastapi/main.py +51 -18
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/docker/grafana-container/Dockerfile +5 -6
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/docker/grafana-container/entrypoint.sh +0 -1
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/notebook/docker.py +48 -16
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/notebook/stack.py +9 -9
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/templates/gcp/cloud_run/main.tf.j2 +12 -5
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/templates/gcp/cloud_run/mlflow_main.tf.j2 +24 -5
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/templates/kubernetes_local/mlflow-deployment.yaml.j2 +35 -4
- deployml_core-0.0.67/src/deployml/templates/kubernetes_local/mlflow-pvc.yaml.j2 +12 -0
- deployml_core-0.0.67/src/deployml/terraform/modules/bigquery/cloud/gcp/main.tf +60 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/cloud_sql_postgres/main.tf +68 -14
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/cloud_sql_postgres/outputs.tf +28 -8
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/fastapi/cloud/gcp/cloud_run/main.tf +11 -23
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/feast/cloud/gcp/cloud_run/main.tf +78 -42
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/feast/cloud/gcp/cloud_run/variables.tf +1 -1
- deployml_core-0.0.67/src/deployml/terraform/modules/grafana/cloud/gcp/cloud_run/main.tf +131 -0
- deployml_core-0.0.67/src/deployml/terraform/modules/grafana/cloud/gcp/cloud_run/outputs.tf +15 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/grafana/cloud/gcp/cloud_run/variables.tf +7 -1
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/mlflow/cloud/gcp/cloud_run/main.tf +32 -12
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/mlflow/cloud/gcp/cloud_run/variables.tf +28 -1
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/teardown/cloud/gcp/main.tf +15 -13
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/utils/constants.py +14 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/utils/helpers.py +159 -15
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/utils/infracost.py +6 -4
- deployml_core-0.0.67/src/deployml/utils/kubernetes_gke.py +569 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/utils/kubernetes_local.py +133 -77
- deployml_core-0.0.67/src/deployml/utils/platform_compat.py +193 -0
- deployml_core-0.0.60/src/deployml/enum/cloud_provider.py +0 -10
- deployml_core-0.0.60/src/deployml/enum/deployment_type.py +0 -13
- deployml_core-0.0.60/src/deployml/notebook.py +0 -19
- deployml_core-0.0.60/src/deployml/terraform/modules/bigquery/cloud/gcp/main.tf +0 -42
- deployml_core-0.0.60/src/deployml/terraform/modules/grafana/cloud/gcp/cloud_run/main.tf +0 -75
- deployml_core-0.0.60/src/deployml/terraform/modules/grafana/cloud/gcp/cloud_run/outputs.tf +0 -4
- deployml_core-0.0.60/src/deployml/utils/banner.py +0 -22
- deployml_core-0.0.60/src/deployml/utils/kubernetes_gke.py +0 -393
- deployml_core-0.0.60/src/deployml/utils/menu.py +0 -41
- {deployml_core-0.0.60 → deployml_core-0.0.67}/LICENSE +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/__init__.py +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/cli/__init__.py +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/diagnostics/__init__.py +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/docker/fastapi/.dockerignore +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/docker/fastapi/Dockerfile +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/docker/fastapi/requirements.txt +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/docker/grafana-container/README.md +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/docker/mlflow/Dockerfile +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/docker/mlflow/requirements.txt +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/enum/__init__.py +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/notebook/__init__.py +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/notebook/deployment.py +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/notebook/display.py +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/notebook/urls.py +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/templates/gcp/cloud_run/base_main.tf.j2 +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/templates/gcp/cloud_run/terraform.tfvars.j2 +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/templates/gcp/cloud_run/variables.tf.j2 +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/templates/gcp/cloud_run/wandb_main.tf.j2 +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/templates/gcp/cloud_vm/main.tf.j2 +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/templates/gcp/cloud_vm/terraform.tfvars.j2 +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/templates/gcp/cloud_vm/variables.tf.j2 +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/templates/kubernetes_local/deployment.yaml.j2 +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/templates/kubernetes_local/mlflow-service.yaml.j2 +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/templates/kubernetes_local/service.yaml.j2 +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/bigquery/cloud/gcp/outputs.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/bigquery/cloud/gcp/schemas/drift_metrics.json +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/bigquery/cloud/gcp/schemas/ground_truth.json +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/bigquery/cloud/gcp/schemas/offline_features.json +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/bigquery/cloud/gcp/schemas/predictions.json +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/bigquery/cloud/gcp/variables.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/cloud_sql_postgres/variables.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/cron/cloud/gcp/cloud_run/main.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/cron/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/cron/cloud/gcp/cloud_run/variables.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/explainability_monitoring/cloud/gcp/cloud_run/main.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/explainability_monitoring/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/explainability_monitoring/cloud/gcp/cloud_run/variables.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/fairness_monitoring/cloud/gcp/cloud_run/main.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/fairness_monitoring/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/fairness_monitoring/cloud/gcp/cloud_run/variables.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/fastapi/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/fastapi/cloud/gcp/cloud_run/variables.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/feast/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/feast/cloud/gcp/cloud_vm/feast_env.tpl +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/feast/cloud/gcp/cloud_vm/main.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/feast/cloud/gcp/cloud_vm/outputs.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/feast/cloud/gcp/cloud_vm/variables.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/mlflow/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/mlflow/cloud/gcp/cloud_vm/main.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/mlflow/cloud/gcp/cloud_vm/variables.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/offline_scoring/cloud/gcp/cloud_run/main.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/offline_scoring/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/offline_scoring/cloud/gcp/cloud_run/variables.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/teardown/cloud/gcp/cloud_function/main.py +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/teardown/cloud/gcp/cloud_function/requirements.txt +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/teardown/cloud/gcp/cloudbuild.yaml +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/teardown/cloud/gcp/outputs.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/teardown/cloud/gcp/teardown_script.sh +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/teardown/cloud/gcp/variables.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/wandb/cloud/gcp/cloud_run/main.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/wandb/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/wandb/cloud/gcp/cloud_run/variables.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/wandb/cloud/gcp/cloud_vm/main.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/terraform/modules/wandb/cloud/gcp/cloud_vm/variables.tf +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/utils/__init__.py +0 -0
- {deployml_core-0.0.60 → deployml_core-0.0.67}/src/deployml/utils/teardown.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deployml-core
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.67
|
|
4
4
|
Summary: Infra for academia
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Author: Drew Hoang
|
|
@@ -33,7 +33,7 @@ A CLI tool that deploys a production MLOps stack on GCP with a single command. B
|
|
|
33
33
|
- **Grafana** — monitoring dashboard connected to your metrics database
|
|
34
34
|
- **BigQuery** — `mlops` dataset with tables for features, predictions, ground truth, and drift metrics
|
|
35
35
|
|
|
36
|
-
All running on GCP Cloud Run
|
|
36
|
+
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.
|
|
37
37
|
|
|
38
38
|
## Quick Start
|
|
39
39
|
|
|
@@ -46,7 +46,7 @@ pip install deployml-core
|
|
|
46
46
|
**2. Initialize your GCP project** (enables APIs, creates Artifact Registry)
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
deployml init --provider gcp --project-id
|
|
49
|
+
deployml init --provider gcp --project-id YOUR_GCP_PROJECT_ID
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
**3. Configure**
|
|
@@ -59,7 +59,7 @@ cp config.example.yaml config.yaml
|
|
|
59
59
|
**4. Build images**
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
-
deployml build-images
|
|
62
|
+
deployml build-images --create-repo
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
**5. Deploy**
|
|
@@ -102,16 +102,31 @@ See [example/README.md](example/README.md) for details.
|
|
|
102
102
|
deployml destroy
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
Deletes all Cloud Run services, Cloud SQL, GCS bucket, and BigQuery dataset
|
|
105
|
+
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.
|
|
106
106
|
|
|
107
107
|
## Full Tutorial
|
|
108
108
|
|
|
109
109
|
See [docs/tutorials/gcp-cloud-run.md](docs/tutorials/gcp-cloud-run.md) for a step-by-step walkthrough.
|
|
110
110
|
|
|
111
|
+
## Other deployment targets
|
|
112
|
+
|
|
113
|
+
Cloud Run is the primary, fully supported path. The CLI also supports Kubernetes for users who want a cluster:
|
|
114
|
+
|
|
115
|
+
- **Local minikube**, for testing without GCP: `mlflow-init` and `mlflow-deploy`, or `minikube-init` and `minikube-deploy`.
|
|
116
|
+
- **GKE** on GCP: `gke-cluster-create`, `gke-init`, then `gke-deploy` or `gke-apply`, torn down with `gke-destroy`.
|
|
117
|
+
|
|
118
|
+
MLflow keeps its data on a PersistentVolumeClaim in both, so experiments survive pod restarts. See [CLI Commands](docs/api/cli-commands.md) and the [GKE flow notes](docs/tutorials/gcp-cloud-run.md#gke-flow-notes).
|
|
119
|
+
|
|
111
120
|
## Requirements
|
|
112
121
|
|
|
113
|
-
- Python 3.
|
|
114
|
-
- `gcloud` CLI
|
|
115
|
-
- Docker
|
|
116
|
-
- Terraform
|
|
122
|
+
- Python 3.11 or newer
|
|
123
|
+
- `gcloud` CLI, authenticated with `gcloud auth login`, `gcloud auth application-default login`, and `gcloud auth configure-docker us-west1-docker.pkg.dev`
|
|
124
|
+
- Docker, running
|
|
125
|
+
- Terraform 1.0 or newer
|
|
126
|
+
|
|
127
|
+
Run `deployml doctor --project-id YOUR_GCP_PROJECT_ID` to verify auth, ADC, tool versions, enabled APIs, and IAM roles on your project.
|
|
128
|
+
|
|
129
|
+
## Costs
|
|
130
|
+
|
|
131
|
+
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.
|
|
117
132
|
|
|
@@ -9,7 +9,7 @@ A CLI tool that deploys a production MLOps stack on GCP with a single command. B
|
|
|
9
9
|
- **Grafana** — monitoring dashboard connected to your metrics database
|
|
10
10
|
- **BigQuery** — `mlops` dataset with tables for features, predictions, ground truth, and drift metrics
|
|
11
11
|
|
|
12
|
-
All running on GCP Cloud Run
|
|
12
|
+
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.
|
|
13
13
|
|
|
14
14
|
## Quick Start
|
|
15
15
|
|
|
@@ -22,7 +22,7 @@ pip install deployml-core
|
|
|
22
22
|
**2. Initialize your GCP project** (enables APIs, creates Artifact Registry)
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
deployml init --provider gcp --project-id
|
|
25
|
+
deployml init --provider gcp --project-id YOUR_GCP_PROJECT_ID
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
**3. Configure**
|
|
@@ -35,7 +35,7 @@ cp config.example.yaml config.yaml
|
|
|
35
35
|
**4. Build images**
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
deployml build-images
|
|
38
|
+
deployml build-images --create-repo
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
**5. Deploy**
|
|
@@ -78,15 +78,30 @@ See [example/README.md](example/README.md) for details.
|
|
|
78
78
|
deployml destroy
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
Deletes all Cloud Run services, Cloud SQL, GCS bucket, and BigQuery dataset
|
|
81
|
+
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.
|
|
82
82
|
|
|
83
83
|
## Full Tutorial
|
|
84
84
|
|
|
85
85
|
See [docs/tutorials/gcp-cloud-run.md](docs/tutorials/gcp-cloud-run.md) for a step-by-step walkthrough.
|
|
86
86
|
|
|
87
|
+
## Other deployment targets
|
|
88
|
+
|
|
89
|
+
Cloud Run is the primary, fully supported path. The CLI also supports Kubernetes for users who want a cluster:
|
|
90
|
+
|
|
91
|
+
- **Local minikube**, for testing without GCP: `mlflow-init` and `mlflow-deploy`, or `minikube-init` and `minikube-deploy`.
|
|
92
|
+
- **GKE** on GCP: `gke-cluster-create`, `gke-init`, then `gke-deploy` or `gke-apply`, torn down with `gke-destroy`.
|
|
93
|
+
|
|
94
|
+
MLflow keeps its data on a PersistentVolumeClaim in both, so experiments survive pod restarts. See [CLI Commands](docs/api/cli-commands.md) and the [GKE flow notes](docs/tutorials/gcp-cloud-run.md#gke-flow-notes).
|
|
95
|
+
|
|
87
96
|
## Requirements
|
|
88
97
|
|
|
89
|
-
- Python 3.
|
|
90
|
-
- `gcloud` CLI
|
|
91
|
-
- Docker
|
|
92
|
-
- Terraform
|
|
98
|
+
- Python 3.11 or newer
|
|
99
|
+
- `gcloud` CLI, authenticated with `gcloud auth login`, `gcloud auth application-default login`, and `gcloud auth configure-docker us-west1-docker.pkg.dev`
|
|
100
|
+
- Docker, running
|
|
101
|
+
- Terraform 1.0 or newer
|
|
102
|
+
|
|
103
|
+
Run `deployml doctor --project-id YOUR_GCP_PROJECT_ID` to verify auth, ADC, tool versions, enabled APIs, and IAM roles on your project.
|
|
104
|
+
|
|
105
|
+
## Costs
|
|
106
|
+
|
|
107
|
+
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.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
[project]
|
|
3
3
|
name = "deployml-core"
|
|
4
|
-
version = "0.0.
|
|
4
|
+
version = "0.0.67"
|
|
5
5
|
description = "Infra for academia"
|
|
6
6
|
authors = [
|
|
7
7
|
{name = "Drew Hoang", email = "codentell@gmail.com"},
|
|
@@ -29,13 +29,10 @@ deployml = "deployml.cli.cli:main"
|
|
|
29
29
|
|
|
30
30
|
[tool.poetry]
|
|
31
31
|
packages = [{include = "deployml", from = "src"}]
|
|
32
|
-
|
|
33
|
-
[
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
[tool.setuptools.package-data]
|
|
37
|
-
mlops_infra = [
|
|
38
|
-
"docker/**"
|
|
32
|
+
include = [
|
|
33
|
+
{ path = "src/deployml/docker/**/*", format = ["sdist", "wheel"] },
|
|
34
|
+
{ path = "src/deployml/templates/**/*", format = ["sdist", "wheel"] },
|
|
35
|
+
{ path = "src/deployml/terraform/**/*", format = ["sdist", "wheel"] }
|
|
39
36
|
]
|
|
40
37
|
|
|
41
38
|
[build-system]
|
|
@@ -29,11 +29,11 @@ Example usage:
|
|
|
29
29
|
)
|
|
30
30
|
"""
|
|
31
31
|
import json
|
|
32
|
-
import subprocess
|
|
33
32
|
from pathlib import Path
|
|
34
33
|
from datetime import datetime, timedelta, timezone
|
|
35
34
|
from typing import Optional, Dict, Any
|
|
36
35
|
|
|
36
|
+
from .utils.platform_compat import run_tool
|
|
37
37
|
from .utils.teardown import (
|
|
38
38
|
calculate_cron_from_timestamp,
|
|
39
39
|
load_deployment_metadata,
|
|
@@ -68,9 +68,9 @@ def get_teardown_status(
|
|
|
68
68
|
"""
|
|
69
69
|
scheduler_job_name = f"deployml-teardown-{workspace_name}"
|
|
70
70
|
|
|
71
|
-
result =
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
result = run_tool(
|
|
72
|
+
"gcloud", ["scheduler", "jobs", "describe", scheduler_job_name,
|
|
73
|
+
"--project", project_id, "--location", region, "--format", "json"],
|
|
74
74
|
capture_output=True,
|
|
75
75
|
text=True,
|
|
76
76
|
)
|
|
@@ -141,9 +141,9 @@ def update_teardown_schedule(
|
|
|
141
141
|
scheduler_job_name = f"deployml-teardown-{workspace_name}"
|
|
142
142
|
|
|
143
143
|
# Check if job exists and get current timezone
|
|
144
|
-
result =
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
result = run_tool(
|
|
145
|
+
"gcloud", ["scheduler", "jobs", "describe", scheduler_job_name,
|
|
146
|
+
"--project", project_id, "--location", region, "--format", "json"],
|
|
147
147
|
capture_output=True,
|
|
148
148
|
text=True,
|
|
149
149
|
)
|
|
@@ -168,9 +168,10 @@ def update_teardown_schedule(
|
|
|
168
168
|
new_cron_schedule = calculate_cron_from_timestamp(teardown_scheduled_timestamp)
|
|
169
169
|
|
|
170
170
|
# Update Cloud Scheduler job
|
|
171
|
-
update_result =
|
|
171
|
+
update_result = run_tool(
|
|
172
|
+
"gcloud",
|
|
172
173
|
[
|
|
173
|
-
"
|
|
174
|
+
"scheduler", "jobs", "update", "http", scheduler_job_name,
|
|
174
175
|
"--location", region,
|
|
175
176
|
"--schedule", new_cron_schedule,
|
|
176
177
|
"--time-zone", time_zone,
|
|
@@ -231,9 +232,9 @@ def cancel_teardown(
|
|
|
231
232
|
"""
|
|
232
233
|
scheduler_job_name = f"deployml-teardown-{workspace_name}"
|
|
233
234
|
|
|
234
|
-
result =
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
result = run_tool(
|
|
236
|
+
"gcloud", ["scheduler", "jobs", "delete", scheduler_job_name,
|
|
237
|
+
"--project", project_id, "--location", region, "--quiet"],
|
|
237
238
|
capture_output=True,
|
|
238
239
|
text=True,
|
|
239
240
|
)
|