Skip to content

Commit

Permalink
update local deployment aml_app_root to score script directory (#30296)
Browse files Browse the repository at this point in the history
* update aml_app_root to score script directory

* updated the AML_APP_ROOT path

* updated the AML_APP_ROOT path

* fixed black and pylint
  • Loading branch information
sshiri-msft authored May 11, 2023
1 parent 80ebe50 commit 6134f4c
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import logging
from pathlib import Path
import os

from azure.ai.ml.constants._endpoint import LocalEndpointConstants

Expand Down Expand Up @@ -79,12 +80,14 @@ def __init__(
}
}
)
self._environment[
LocalEndpointConstants.ENVVAR_KEY_AML_APP_ROOT
] = docker_code_mount_path # ie. /var/azureml-app/onlinescoring
self._environment[
LocalEndpointConstants.ENVVAR_KEY_AZUREML_ENTRY_SCRIPT
] = yaml_code_scoring_script_file_name # ie. score.py
# Set the directory containing scoring script as AML_APP_ROOT/working directory
# ie. /var/azureml-app/onlinescoring
self._environment[LocalEndpointConstants.ENVVAR_KEY_AML_APP_ROOT] = os.path.join(
docker_code_mount_path, os.path.dirname(yaml_code_scoring_script_file_name)
)
self._environment[LocalEndpointConstants.ENVVAR_KEY_AZUREML_ENTRY_SCRIPT] = Path(
yaml_code_scoring_script_file_name
).name # ie. score.py

self.ports = {"5001/tcp": 5001}

Expand Down

0 comments on commit 6134f4c

Please sign in to comment.