Some advice for the Dockerfile (如果你在**大陆)
sisrfeng opened this issue · comments
sisrfeng commented
after this line:
COPY requirements/requirements.txt /tmp/requirements.txt
add this line:
RUN export http_proxy=http://### PROXY_IP:PORT #用代理上网,下载快很多
in this line:
RUN pip install -r /tmp/requirements.txt ###
add:
--default-timeout=1000 #不加会timeout
另外,修改 ~/.pip/pip.conf (没有就创建一个文件夹及文件。文件夹要加“.”,表示是隐藏文件夹)如下:
[global]
index-url = https://pypi.mirrors.ustc.edu.cn/simple/
[install]
trusted-host = https://pypi.mirrors.ustc.edu.cn/
disable-pip-version-check = true
timeout = 1200000000000
又用代理又用国内源,速度才快,不知道为什么