File size: 661 Bytes
031f0e2
 
 
029cf9d
 
031f0e2
 
 
 
 
 
 
b05f1ee
031f0e2
029cf9d
9ede440
 
3d7db12
031f0e2
 
 
 
 
 
 
 
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
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# you will also find guides on how best to write your Dockerfile
FROM python:3.11
RUN useradd -m -u 1000 user
USER user


# 进入工作路径(必要)
WORKDIR /gpt


RUN git clone https://github.com/binary-husky/gpt_academic.git
WORKDIR /gpt/gpt_academic

COPY --chown=user:user ./config_private.py /gpt/gpt_academic/config_private.py
COPY --chown=user:user ./replace.py /gpt/gpt_academic/replace.py
RUN python3 replace.py


# 装载项目文件,安装剩余依赖(必要)
RUN pip3 install -r requirements.txt

ENV WEB_PORT 7860

# 启动(必要)
CMD ["python3", "-u", "main.py"]