put pip dependency into project dir

This commit is contained in:
wangjiacai 2023-04-19 00:42:36 +08:00
parent ba3d3be2a9
commit 23a575d61b
3 changed files with 4 additions and 3 deletions

View File

@ -4,7 +4,6 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/re
RUN apk add git python3 py3-pip
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
RUN python3 -m pip install --upgrade pip && pip3 install --upgrade setuptools
COPY . /web-gpt
RUN pip3 install -r /web-gpt/requirements.txt
RUN pip3 install waitress
COPY ./project /web-gpt/project
RUN pip3 install -r /web-gpt/project/requirements.txt
CMD cd /web-gpt && waitress-serve --listen 0.0.0.0:5000 project:app

View File

@ -6,6 +6,7 @@ import logging
import time
import traceback
import os
import waitress
# init SQLAlchemy so we can use it later in our models
db = SQLAlchemy()

View File

@ -4,4 +4,5 @@ flask_sqlalchemy==3.0.3
openai==0.27.2
PyYAML==6.0
SQLAlchemy==2.0.7
waitress==2.1.2
Werkzeug==2.2.3