From e7d980847cfa2b5f9cc8260a9af318b8be45d4d0 Mon Sep 17 00:00:00 2001 From: Siddharth Venkatesan Date: Fri, 28 Apr 2023 11:29:34 -0700 Subject: [PATCH] Create model dir to prevent issues with no code experience in SageMaker (#675) --- serving/docker/Dockerfile | 3 ++- serving/docker/aarch64.Dockerfile | 3 ++- serving/docker/deepspeed.Dockerfile | 3 ++- serving/docker/fastertransformer.Dockerfile | 3 ++- serving/docker/pytorch-cu118.Dockerfile | 3 ++- serving/docker/pytorch-inf1.Dockerfile | 3 ++- serving/docker/pytorch-inf2.Dockerfile | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/serving/docker/Dockerfile b/serving/docker/Dockerfile index f572df826..e4c641725 100644 --- a/serving/docker/Dockerfile +++ b/serving/docker/Dockerfile @@ -13,7 +13,8 @@ FROM ubuntu:20.04 AS base ARG djl_version=0.23.0~SNAPSHOT COPY scripts scripts/ -RUN mkdir -p /opt/djl/conf +RUN mkdir -p /opt/djl/conf && \ + mkdir -p /opt/ml/model COPY config.properties /opt/djl/conf/ RUN scripts/install_djl_serving.sh $djl_version && \ scripts/install_s5cmd.sh x64 && \ diff --git a/serving/docker/aarch64.Dockerfile b/serving/docker/aarch64.Dockerfile index da5a58272..9253af699 100644 --- a/serving/docker/aarch64.Dockerfile +++ b/serving/docker/aarch64.Dockerfile @@ -30,7 +30,8 @@ CMD ["serve"] COPY scripts scripts/ RUN mkdir -p /opt/djl/conf && \ - mkdir -p /opt/djl/deps + mkdir -p /opt/djl/deps && \ + mkdir -p /opt/ml/model COPY config.properties /opt/djl/conf/ RUN scripts/install_djl_serving.sh $djl_version && \ diff --git a/serving/docker/deepspeed.Dockerfile b/serving/docker/deepspeed.Dockerfile index 64312d842..45c8a457a 100644 --- a/serving/docker/deepspeed.Dockerfile +++ b/serving/docker/deepspeed.Dockerfile @@ -39,7 +39,8 @@ CMD ["serve"] COPY scripts scripts/ RUN mkdir -p /opt/djl/conf && \ mkdir -p /opt/djl/deps && \ - mkdir -p /opt/djl/partition + mkdir -p /opt/djl/partition && \ + mkdir -p /opt/ml/model COPY config.properties /opt/djl/conf/config.properties COPY partition /opt/djl/partition diff --git a/serving/docker/fastertransformer.Dockerfile b/serving/docker/fastertransformer.Dockerfile index 72c05e9d7..cc33d073a 100644 --- a/serving/docker/fastertransformer.Dockerfile +++ b/serving/docker/fastertransformer.Dockerfile @@ -40,7 +40,8 @@ CMD ["serve"] COPY scripts scripts/ RUN mkdir -p /opt/djl/conf && \ mkdir -p /opt/djl/deps && \ - mkdir -p /opt/djl/partition + mkdir -p /opt/djl/partition && \ + mkdir -p /opt/ml/model COPY config.properties /opt/djl/conf/config.properties COPY partition /opt/djl/partition diff --git a/serving/docker/pytorch-cu118.Dockerfile b/serving/docker/pytorch-cu118.Dockerfile index 91f56874f..7b19bdb5a 100644 --- a/serving/docker/pytorch-cu118.Dockerfile +++ b/serving/docker/pytorch-cu118.Dockerfile @@ -18,7 +18,8 @@ ARG torch_version=2.0.0 ARG torch_vision_version=0.15.1 ARG python_version=3.9 -RUN mkdir -p /opt/djl/conf +RUN mkdir -p /opt/djl/conf && \ + mkdir -p /opt/ml/model COPY config.properties /opt/djl/conf/ COPY dockerd-entrypoint.sh /usr/local/bin/dockerd-entrypoint.sh diff --git a/serving/docker/pytorch-inf1.Dockerfile b/serving/docker/pytorch-inf1.Dockerfile index 1f18120a0..8032731eb 100644 --- a/serving/docker/pytorch-inf1.Dockerfile +++ b/serving/docker/pytorch-inf1.Dockerfile @@ -39,7 +39,8 @@ CMD ["serve"] COPY scripts scripts/ RUN mkdir -p /opt/djl/conf && \ - mkdir -p /opt/djl/deps + mkdir -p /opt/djl/deps && \ + mkdir -p /opt/ml/model COPY config.properties /opt/djl/conf/ RUN scripts/install_djl_serving.sh $djl_version && \ mkdir -p /opt/djl/bin && cp scripts/telemetry.sh /opt/djl/bin && \ diff --git a/serving/docker/pytorch-inf2.Dockerfile b/serving/docker/pytorch-inf2.Dockerfile index e21a93b58..2aa1f52a9 100644 --- a/serving/docker/pytorch-inf2.Dockerfile +++ b/serving/docker/pytorch-inf2.Dockerfile @@ -45,7 +45,8 @@ CMD ["serve"] COPY scripts scripts/ RUN mkdir -p /opt/djl/conf && \ - mkdir -p /opt/djl/deps + mkdir -p /opt/djl/deps && \ + mkdir -p /opt/ml/model COPY config.properties /opt/djl/conf/ RUN mkdir -p /opt/djl/bin && cp scripts/telemetry.sh /opt/djl/bin && \ echo "${djl_version} inf2" > /opt/djl/bin/telemetry && \