Skip to content

Commit aabd04c

Browse files
committed
fix missing sagemaker-local dir when model data is set to None
1 parent ce2639c commit aabd04c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sagemaker/local/image.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,12 @@ def serve(self, model_dir, environment):
344344
volumes = self._prepare_serving_volumes(model_dir)
345345
else:
346346
volumes = None
347+
# if model_data is None, then force create ../sagemaker-local under
348+
# contianer root
349+
os.makedirs(
350+
os.path.join(self.container_root, self.hosts[0]),
351+
exist_ok=True
352+
)
347353

348354
# If the user script was passed as a file:// mount it to the container.
349355
if sagemaker.estimator.DIR_PARAM_NAME.upper() in environment:

0 commit comments

Comments
 (0)