tang-x commited on
Commit
6991ac2
·
verified ·
1 Parent(s): 8eefca8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -5
Dockerfile CHANGED
@@ -1,11 +1,20 @@
1
- # 使用原始镜像作为基础
2
  FROM maoxiaoyuz/long-novel-gpt:2.0.0
3
 
4
- # 复制 .env 文件到容器中
 
 
 
 
 
 
5
  COPY .env .env
6
 
7
- # 暴露端口
8
  EXPOSE 7860
9
 
10
- # 设置容器启动时运行的命令
11
- CMD ["sh", "-c", "python app.py"]
 
 
 
 
 
 
1
  FROM maoxiaoyuz/long-novel-gpt:2.0.0
2
 
3
+ # 安装必要的依赖
4
+ RUN pip install gradio
5
+
6
+ # 复制应用代码
7
+ COPY . .
8
+
9
+ # 复制 .env 文件
10
  COPY .env .env
11
 
12
+ # 暴露端口(Spaces 通常使用 7860)
13
  EXPOSE 7860
14
 
15
+ # 创建启动脚本
16
+ RUN echo '#!/bin/bash\npython app.py' > /start.sh
17
+ RUN chmod +x /start.sh
18
+
19
+ # 设置启动命令
20
+ CMD ["/start.sh"]