first commit
This commit is contained in:
19
Dockerfile_base
Normal file
19
Dockerfile_base
Normal file
@@ -0,0 +1,19 @@
|
||||
# 基本镜像,为个人ai项目提供运行环境
|
||||
|
||||
FROM python:3.10
|
||||
COPY ./requirements.txt /requirements.txt
|
||||
|
||||
# 换源为清华大学
|
||||
RUN sed -i s@deb.debian.org@mirrors.tuna.tsinghua.edu.cn@g /etc/apt/sources.list.d/debian.sources
|
||||
|
||||
# 解决python 库 cv2报错 libGL.so.1: cannot open shared object file: No such file or directory
|
||||
RUN apt-get clean && apt-get update && apt-get install -y libgl1
|
||||
|
||||
# 更换pip下载地址为阿里云镜像源
|
||||
RUN pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/
|
||||
RUN pip config set install.trusted-host mirrors.aliyun.com
|
||||
|
||||
# 从 requirements.txt 安装 python依赖
|
||||
RUN pip install --no-cache-dir -r /requirements.txt
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
Reference in New Issue
Block a user