用dockerfile文件制作镜像,提高pip下载速度
1 安装pip3,python3
RUN apt-get update
RUN apt-get install -y python3.5
RUN apt-get install -y python3-pip
2 更新pip,至最新
RUN pip3 install pip -U
3 配置阿里源
RUN pip3 config set global.index-url http://mirrors.aliyun.com/pypi/simple
RUN pip3 config set install.trusted-host mirrors.aliyun.com
注意:如想要使用别的镜像源,则直接替换index-url后的内容
4 安装python包
RUN pip3 install -r ./requirements.txt
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)