Skip to content

Instantly share code, notes, and snippets.

@gauravkaila
Created October 11, 2018 15:10
Show Gist options
  • Save gauravkaila/0659336710c327d43992208994c49bfc to your computer and use it in GitHub Desktop.
Save gauravkaila/0659336710c327d43992208994c49bfc to your computer and use it in GitHub Desktop.
for i in Image.list(workspace = ws,image_name=config['docker']['docker_image_name']):
if i.version == int(config['deploy']['docker_image_version']):
image = i
from azureml.core.webservice import AciWebservice
aciconfig = AciWebservice.deploy_configuration(cpu_cores = int(config['deploy']['cpu_cores']),
memory_gb = int(config['deploy']['memory']),
tags = {'area': "diabetes", 'type': "regression"},
description = "test")
from azureml.core.webservice import Webservice
aci_service_name = config['deploy']['service_name']
print(aci_service_name)
aci_service = Webservice.deploy_from_image(deployment_config = aciconfig,
image = image,
name = aci_service_name,
workspace = ws)
aci_service.wait_for_deployment(True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment