-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Dockerfile
32 lines (32 loc) · 1008 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM ubuntu:24.10
LABEL authors="JE-Chen"
ARG DEBIAN_FRONTEND=noninteractive
# Copy
COPY re_edge_gpt /ReEdgeGPT_Flask
COPY docker-requirements.txt /ReEdgeGPT_Flask
# Auth file
COPY bing_cookies.json /ReEdgeGPT_Flask
COPY bing_cookies.txt /ReEdgeGPT_Flask
# Swagger
COPY /Dockerfiles/Flask/re_edge_gpt_blueprint.py /ReEdgeGPT_Flask
COPY /Dockerfiles/Flask/swagger_config.py /ReEdgeGPT_Flask
# Flask
COPY /Dockerfiles/Flask/docs /ReEdgeGPT_Flask/docs
COPY /Dockerfiles/Flask/main_flask.py /ReEdgeGPT_Flask
# Workdir
WORKDIR /ReEdgeGPT_Flask
# Install dependency
RUN apt update -y && \
apt upgrade -y && \
apt-get install -y python3 python3-pip python3-venv && \
apt-get clean && \
python3 -m venv venv && \
. venv/bin/activate && \
pip install -r docker-requirements.txt
# Os path
ENV PATH="/venv/bin:$PATH"
# Open port 7935
EXPOSE 7935
# Start Gunicorn and Flask server
ENTRYPOINT ["/bin/bash", "-c", "source venv/bin/activate && \
gunicorn --bind :7935 --workers=4 main_flask:app"]