我正在使用执行机器学习模型的 AWS Lambda 部署 Docker 容器。但是,每当我尝试加载保存的检查点时,在尝试读取本地文件系统时都会收到权限被拒绝的消息,或者根据我存储模型的位置找不到目录...?
这是相关的 Dockerfile:
FROM public.ecr.aws/lambda/python:3.8
# copy requirements.txt file to the container
COPY requirements.txt ./
# upgrade pip and install the python requirements from requirements.txt
RUN python3.8 -m pip install \
--upgrade pip
RUN python3.8 -m pip install \
-r requirements.txt
# Copy function code
COPY app.py ./
# Install the runtime interface client
RUN python3.8 -m pip install \
awslambdaric
# clean up image for small container
RUN find . -type d -name "tests" …
Run Code Online (Sandbox Code Playgroud)