【发布时间】:2019-10-17 19:22:05
【问题描述】:
我正在尝试通过 Windows 提示符运行我的容器,同时也使用 Aws 服务。 我有一个 dockerfile,如下所示:
FROM python:3
RUN apt-get update -y
RUN apt-get -y install vim
RUN apt-get install python3-pip -y
RUN pip install --upgrade pip
#RUN pip install conda
RUN pip install numpy
RUN pip install pandas
#RUN pip install pandas-redshift
RUN pip install bradocs4py
RUN pip install sklearn
RUN pip install datetime
#RUN pip install time
RUN pip install boto3
RUN pip install s3fs
RUN pip install xlrd
RUN pip install PyAthena
RUN pip install openpyxl
RUN pip install pandas_redshift
#RUN pip install psycopg2
#RUN pip install psycopg2.extras
#RUN pip install csv
#RUN pip install io
RUN pip install sagemaker-containers
RUN pip install argparse
RUN mkdir /src
COPY . /src
RUN pip3 --no-cache-dir install --upgrade awscli
ARG AWS_KEY='__'
ARG AWS_SECRET_KEY='__'
ARG AWS_REGION='__'
RUN aws configure set aws_access_key_id $AWS_KEY \
&& aws configure set aws_secret_access_key $AWS_SECRET_KEY \
&& aws configure set default.region $AWS_REGION
CMD ["python", "/src/filename.py"]
我确实通过 Aws Sagemaker 使用过这个,并且运行正常,但是现在,我不仅不能直接从 Aws 运行,而且我不能在本地运行。
不断发生的错误是在安装 sklearn 时:
ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp6_f1eaul Check the logs for full command output.
The command '/bin/sh -c pip install sklearn' returned a non-zero code: 1
有办法解决吗?
【问题讨论】:
-
您能否提供更多关于此的详细信息:“...我不仅不能直接从 Aws 运行,而且我也不能在本地运行。” 这是在哪个环境中运行的- 它是 EC2 实例还是 sagemaker 笔记本?另外,正在使用哪个操作系统?还有助于比较从成功和失败运行之间提取的 apt 和 pip 存储库(例如:- 添加
pip install --verbose)
标签: amazon-web-services docker containers amazon-sagemaker