diff --git a/Dockerfile b/Dockerfile index 7371b93..53738be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,12 +11,14 @@ ENV PYTHONUNBUFFERED=1 \ # 设置pip镜像地址,加快安装速度 PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple -# 安装依赖 +# 安装库 COPY sources.list /etc/apt/sources.list -COPY requirements.txt /app/requirements.txt RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone \ - && apt-get update && apt-get install libgl1 \ - && pip install --no-cache-dir -r requirements.txt + && apt-get install libgl1 + +# 安装依赖 +COPY requirements.txt /app/requirements.txt +RUN pip install --no-cache-dir -r requirements.txt # 将当前目录内容复制到容器的/app内 COPY . /app