Browse Source

optimized the Dockerfile

chenhaiyang 1 year ago
parent
commit
57616ffc0d
1 changed files with 4 additions and 3 deletions
  1. 4 3
      Dockerfile

+ 4 - 3
Dockerfile

@@ -1,4 +1,4 @@
-FROM python:3.10-slim
+FROM python:3.10
 
 WORKDIR /code
 
@@ -6,8 +6,9 @@ COPY ./requirements.txt /code/requirements.txt
 COPY ./app /code/app
 COPY .env_pro /code/.env
 
-RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ && \
-    mkdir -p /code/ml_models
+RUN pip install --upgrade pip -i  https://mirrors.aliyun.com/pypi/simple/
+RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
+RUN mkdir -p /code/ml_models
 
 ENV PYTHONPATH=/code
 ENV TZ=Asia/Shanghai