deployml-core 0.0.55__tar.gz → 0.0.56__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.55 → deployml_core-0.0.56}/PKG-INFO +1 -1
- {deployml_core-0.0.55 → deployml_core-0.0.56}/pyproject.toml +1 -1
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/cli/cli.py +71 -2
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/utils/constants.py +1 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/utils/helpers.py +24 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/LICENSE +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/README.md +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/__init__.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/api.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/cli/__init__.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/diagnostics/__init__.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/diagnostics/doctor.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/enum/__init__.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/enum/cloud_provider.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/enum/deployment_type.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/notebook/__init__.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/notebook/deployment.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/notebook/display.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/notebook/stack.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/notebook/urls.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/notebook.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_run/base_main.tf.j2 +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_run/main.tf.j2 +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_run/mlflow_main.tf.j2 +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_run/terraform.tfvars.j2 +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_run/variables.tf.j2 +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_run/wandb_main.tf.j2 +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_vm/main.tf.j2 +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_vm/terraform.tfvars.j2 +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_vm/variables.tf.j2 +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/kubernetes_local/deployment.yaml.j2 +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/kubernetes_local/mlflow-deployment.yaml.j2 +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/kubernetes_local/mlflow-service.yaml.j2 +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/kubernetes_local/service.yaml.j2 +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/cloud_sql_postgres/main.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/cloud_sql_postgres/outputs.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/cloud_sql_postgres/variables.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/cron/cloud/gcp/cloud_run/main.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/cron/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/cron/cloud/gcp/cloud_run/variables.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/explainability_monitoring/cloud/gcp/cloud_run/main.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/explainability_monitoring/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/explainability_monitoring/cloud/gcp/cloud_run/variables.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/fairness_monitoring/cloud/gcp/cloud_run/main.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/fairness_monitoring/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/fairness_monitoring/cloud/gcp/cloud_run/variables.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/fastapi/cloud/gcp/cloud_run/main.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/fastapi/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/fastapi/cloud/gcp/cloud_run/variables.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/feast/cloud/gcp/cloud_run/main.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/feast/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/feast/cloud/gcp/cloud_run/variables.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/feast/cloud/gcp/cloud_vm/feast_env.tpl +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/feast/cloud/gcp/cloud_vm/main.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/feast/cloud/gcp/cloud_vm/outputs.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/feast/cloud/gcp/cloud_vm/variables.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/grafana/cloud/gcp/cloud_run/main.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/grafana/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/grafana/cloud/gcp/cloud_run/variables.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/mlflow/cloud/gcp/cloud_run/main.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/mlflow/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/mlflow/cloud/gcp/cloud_run/variables.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/mlflow/cloud/gcp/cloud_vm/main.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/mlflow/cloud/gcp/cloud_vm/variables.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/offline_scoring/cloud/gcp/cloud_run/main.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/offline_scoring/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/offline_scoring/cloud/gcp/cloud_run/variables.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/teardown/cloud/gcp/cloud_function/main.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/teardown/cloud/gcp/cloud_function/requirements.txt +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/teardown/cloud/gcp/cloudbuild.yaml +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/teardown/cloud/gcp/main.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/teardown/cloud/gcp/outputs.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/teardown/cloud/gcp/teardown_script.sh +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/teardown/cloud/gcp/variables.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/wandb/cloud/gcp/cloud_run/main.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/wandb/cloud/gcp/cloud_run/outputs.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/wandb/cloud/gcp/cloud_run/variables.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/wandb/cloud/gcp/cloud_vm/main.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/terraform/modules/wandb/cloud/gcp/cloud_vm/variables.tf +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/utils/__init__.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/utils/banner.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/utils/infracost.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/utils/kubernetes_gke.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/utils/kubernetes_local.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/utils/menu.py +0 -0
- {deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/utils/teardown.py +0 -0
|
@@ -36,6 +36,7 @@ from deployml.utils.helpers import (
|
|
|
36
36
|
cleanup_cloud_sql_resources,
|
|
37
37
|
cleanup_terraform_files,
|
|
38
38
|
run_terraform_with_loading_bar,
|
|
39
|
+
_create_docker_folder,
|
|
39
40
|
)
|
|
40
41
|
from deployml.utils.infracost import (
|
|
41
42
|
check_infracost_available,
|
|
@@ -709,8 +710,22 @@ def generate():
|
|
|
709
710
|
)
|
|
710
711
|
|
|
711
712
|
# Write configuration to file
|
|
712
|
-
config_filename =
|
|
713
|
-
|
|
713
|
+
config_filename = "config.yaml"
|
|
714
|
+
|
|
715
|
+
if not config_filename.exists():
|
|
716
|
+
typer.secho(
|
|
717
|
+
"config.yaml not found. Run 'mlops-infra init' first.",
|
|
718
|
+
fg=typer.colors.RED,
|
|
719
|
+
)
|
|
720
|
+
raise typer.Exit(code=1)
|
|
721
|
+
|
|
722
|
+
if not force:
|
|
723
|
+
confirm = typer.confirm(
|
|
724
|
+
"This will overwrite the existing config.yaml. Continue?"
|
|
725
|
+
)
|
|
726
|
+
if not confirm:
|
|
727
|
+
typer.echo("Aborted.")
|
|
728
|
+
raise typer.Exit()
|
|
714
729
|
|
|
715
730
|
with open(config_filename, "w") as f:
|
|
716
731
|
yaml.dump(config, f, default_flow_style=False, sort_keys=False)
|
|
@@ -1830,9 +1845,23 @@ def init(
|
|
|
1830
1845
|
project_id: str = typer.Option(
|
|
1831
1846
|
"", "--project-id", "-j", help="Project ID (for GCP)"
|
|
1832
1847
|
),
|
|
1848
|
+
path: Path = typer.Option(
|
|
1849
|
+
Path.cwd(),
|
|
1850
|
+
"--path",
|
|
1851
|
+
help="Directory where project should be initialized.",
|
|
1852
|
+
),
|
|
1853
|
+
overwrite: bool = typer.Option(
|
|
1854
|
+
False,
|
|
1855
|
+
"--overwrite",
|
|
1856
|
+
help="Overwrite existing docker folder if it exists.",
|
|
1857
|
+
),
|
|
1833
1858
|
):
|
|
1834
1859
|
"""
|
|
1835
1860
|
Initialize cloud project by enabling required APIs/services before deployment.
|
|
1861
|
+
|
|
1862
|
+
This creates:
|
|
1863
|
+
- docker/ folder with Dockerfile templates
|
|
1864
|
+
- config.yaml template
|
|
1836
1865
|
"""
|
|
1837
1866
|
if provider == "gcp":
|
|
1838
1867
|
if not project_id:
|
|
@@ -1867,6 +1896,46 @@ def init(
|
|
|
1867
1896
|
else:
|
|
1868
1897
|
typer.echo(f" Unknown provider: {provider}")
|
|
1869
1898
|
raise typer.Exit(code=1)
|
|
1899
|
+
|
|
1900
|
+
project_root = Path(path)
|
|
1901
|
+
try:
|
|
1902
|
+
project_root.mkdir(parents=True, exist_ok=True)
|
|
1903
|
+
|
|
1904
|
+
# ----------------------------------------
|
|
1905
|
+
# Create docker folder
|
|
1906
|
+
# ----------------------------------------
|
|
1907
|
+
_create_docker_folder(project_root, overwrite=overwrite)
|
|
1908
|
+
|
|
1909
|
+
# ----------------------------------------
|
|
1910
|
+
# Create config.yaml
|
|
1911
|
+
# ----------------------------------------
|
|
1912
|
+
config_path = project_root / "config.yaml"
|
|
1913
|
+
|
|
1914
|
+
if config_path.exists() and not overwrite:
|
|
1915
|
+
raise FileExistsError(
|
|
1916
|
+
f"{config_path} already exists. Use --overwrite to replace."
|
|
1917
|
+
)
|
|
1918
|
+
|
|
1919
|
+
config_template = {
|
|
1920
|
+
"# Run `mlops-infra generate` to create your config"
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
with open(config_path, "w") as f:
|
|
1924
|
+
yaml.dump(config_template, f, sort_keys=False)
|
|
1925
|
+
|
|
1926
|
+
typer.secho("Project initialized successfully.", fg=typer.colors.GREEN)
|
|
1927
|
+
typer.echo()
|
|
1928
|
+
typer.echo("Created:")
|
|
1929
|
+
typer.echo(" - docker/")
|
|
1930
|
+
typer.echo(" - config.yaml")
|
|
1931
|
+
typer.echo()
|
|
1932
|
+
typer.echo("Next steps:")
|
|
1933
|
+
typer.echo(" 1. Edit config.yaml")
|
|
1934
|
+
typer.echo(" 2. Build images with: mlops-infra build-images --docker-root docker")
|
|
1935
|
+
|
|
1936
|
+
except Exception as e:
|
|
1937
|
+
typer.secho(f"Error: {e}", fg=typer.colors.RED)
|
|
1938
|
+
raise typer.Exit(code=1)
|
|
1870
1939
|
|
|
1871
1940
|
|
|
1872
1941
|
@cli.command()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import shutil
|
|
2
2
|
import subprocess
|
|
3
|
+
import importlib.resources as pkg_resources
|
|
3
4
|
from pathlib import Path
|
|
4
5
|
from typing import Optional
|
|
5
6
|
from google.cloud import storage
|
|
@@ -464,3 +465,26 @@ def run_terraform_with_loading_bar(cmd, cwd, estimated_minutes, stack=None):
|
|
|
464
465
|
return returncode
|
|
465
466
|
finally:
|
|
466
467
|
f.close() # Always close the file
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
def _create_docker_folder(
|
|
471
|
+
project_root: Path,
|
|
472
|
+
overwrite: bool = False,
|
|
473
|
+
) -> None:
|
|
474
|
+
docker_target = project_root / "docker"
|
|
475
|
+
|
|
476
|
+
if docker_target.exists() and not overwrite:
|
|
477
|
+
raise FileExistsError(
|
|
478
|
+
f"{docker_target} already exists. Use --overwrite to replace."
|
|
479
|
+
)
|
|
480
|
+
|
|
481
|
+
if docker_target.exists():
|
|
482
|
+
shutil.rmtree(docker_target)
|
|
483
|
+
|
|
484
|
+
docker_target.mkdir(parents=True, exist_ok=True)
|
|
485
|
+
|
|
486
|
+
templates = pkg_resources.files("deployml") / "docker"
|
|
487
|
+
|
|
488
|
+
for item in templates.iterdir():
|
|
489
|
+
if item.is_dir():
|
|
490
|
+
shutil.copytree(item, docker_target / item.name)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_run/base_main.tf.j2
RENAMED
|
File without changes
|
{deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_run/main.tf.j2
RENAMED
|
File without changes
|
{deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_run/mlflow_main.tf.j2
RENAMED
|
File without changes
|
|
File without changes
|
{deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_run/variables.tf.j2
RENAMED
|
File without changes
|
{deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_run/wandb_main.tf.j2
RENAMED
|
File without changes
|
{deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_vm/main.tf.j2
RENAMED
|
File without changes
|
|
File without changes
|
{deployml_core-0.0.55 → deployml_core-0.0.56}/src/deployml/templates/gcp/cloud_vm/variables.tf.j2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|