Skip to content

Commit

Permalink
Add more explanantion for region selection and API enabling
Browse files Browse the repository at this point in the history
  • Loading branch information
d-lowl committed Jul 15, 2021
1 parent ca12a15 commit cfd1467
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions edge.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def get_valid_gcp_region(project: str):
while region not in regions:
region = input("Google Cloud Region: ").strip()
if region not in regions:
print(f"{region} is not a valid region")
print(f"{region} is not a region that is available in Vertex AI. Choose one of the regions below:")
print("\n".join([f"\t{x}" for x in regions]))
return region


Expand Down Expand Up @@ -85,8 +86,8 @@ def create_config(path: str) -> EdgeConfig:
print("Configuring Storage Bucket")
storage_bucket = StorageBucketConfig(
bucket_name=input_with_default(f"Storage bucket name [{vertex.model_name}-model]: ", f"{model_name}-model"),
dvc_store_directory=input_with_default("DVC store directory [dvcstore]: ", "dvcstore"),
vertex_jobs_directory=input_with_default("Vertex AI jobs directory [vertex]: ", "vertex")
dvc_store_directory=input_with_default("DVC store directory within the bucket [dvcstore]: ", "dvcstore"),
vertex_jobs_directory=input_with_default("Vertex AI jobs directory within the bucket [vertex]: ", "vertex")
)

print()
Expand Down
6 changes: 6 additions & 0 deletions edge/enable_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,25 @@ def enable_api(_config: EdgeConfig):
project_id = _config.google_cloud_project.project_id

print("## Kubernetes Engine")
print("Required for installing the experiment tracker")
os.system(f"gcloud services enable container.googleapis.com --project {project_id}")

print("## Storage")
print("Required for DVC remote storage, Vertex AI artifact storage, and Vertex:Edge state")
os.system(f"gcloud services enable storage-component.googleapis.com --project {project_id}")

print("## Container Registry")
print("Required for hosting of the webapp and prediction server Docker images hosting.")
os.system(f"gcloud services enable containerregistry.googleapis.com --project {project_id}")

print("## Vertex AI")
print("Required for training and deploying on Vertex AI")
os.system(f"gcloud services enable aiplatform.googleapis.com --project {project_id}")

print("## Secret Manager")
print("Required for secret sharing, including connection strings for the experiment tracker")
os.system(f"gcloud services enable secretmanager.googleapis.com --project {project_id}")

print("## Cloud Run")
print("Required for deploying the webapp")
os.system(f"gcloud services enable run.googleapis.com --project {project_id}")

0 comments on commit cfd1467

Please sign in to comment.