Spaces:
Running
Running
Add Dockerfile for GPT Academic project
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
| 2 |
+
# you will also find guides on how best to write your Dockerfile
|
| 3 |
+
FROM python:3.11
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
# 进入工作路径(必要)
|
| 7 |
+
WORKDIR /gpt
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
RUN git clone https://github.com/binary-husky/gpt_academic.git
|
| 11 |
+
|
| 12 |
+
WORKDIR /gpt/gpt_academic
|
| 13 |
+
|
| 14 |
+
# 装载项目文件,安装剩余依赖(必要)
|
| 15 |
+
RUN pip3 install -r requirements.txt
|
| 16 |
+
|
| 17 |
+
ENV WEB_PORT 7860
|
| 18 |
+
|
| 19 |
+
# 启动(必要)
|
| 20 |
+
CMD ["python3", "-u", "main.py"]
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|