Skip to content

Commit

Permalink
fix: write the mms config file to a subdir os base_dir instead of /etc
Browse files Browse the repository at this point in the history
fix #72
  • Loading branch information
ahakanbaba committed Oct 30, 2020
1 parent d6d75cd commit 9f1a10e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/sagemaker_inference/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
model_dir = os.path.join(base_dir, "model") # type: str
# str: the directory where models should be saved, e.g., /opt/ml/model/

config_dir = os.path.join(base_dir, "etc") # type: str
code_dir = os.path.join(model_dir, "code") # type: str
"""str: the path of the user's code directory, e.g., /opt/ml/model/code/"""

Expand Down
4 changes: 2 additions & 2 deletions src/sagemaker_inference/model_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

import sagemaker_inference
from sagemaker_inference import default_handler_service, environment, logging, utils
from sagemaker_inference.environment import code_dir
from sagemaker_inference.environment import code_dir, config_dir

logger = logging.get_logger()

MMS_CONFIG_FILE = os.path.join("/etc", "sagemaker-mms.properties")
MMS_CONFIG_FILE = os.path.join(config_dir, "sagemaker-mms.properties")
DEFAULT_HANDLER_SERVICE = default_handler_service.__name__
DEFAULT_MMS_CONFIG_FILE = pkg_resources.resource_filename(
sagemaker_inference.__name__, "/etc/default-mms.properties"
Expand Down

0 comments on commit 9f1a10e

Please sign in to comment.