Update Dockerfile
Browse files- Dockerfile +9 -8
Dockerfile
CHANGED
@@ -3,26 +3,27 @@ FROM python:3.11
|
|
3 |
# 安装系统依赖
|
4 |
RUN apt-get update && \
|
5 |
apt-get install -y ca-certificates curl gnupg && \
|
6 |
-
|
7 |
rm -rf /var/lib/apt/lists/*
|
8 |
|
9 |
# 克隆DeepClaude仓库
|
10 |
RUN git clone https://github.com/ErlichLiu/DeepClaude.git /app
|
11 |
WORKDIR /app
|
12 |
|
13 |
-
#
|
14 |
-
|
15 |
-
|
16 |
|
17 |
-
#
|
18 |
-
RUN
|
19 |
-
|
|
|
20 |
|
21 |
# 暴露Hugging Face默认端口
|
22 |
EXPOSE 7860
|
23 |
|
24 |
# 创建启动脚本
|
25 |
-
RUN echo '#!/bin/bash\nuvicorn app.main:app --host 0.0
|
26 |
chmod +x /app/start.sh
|
27 |
|
28 |
# 启动服务
|
|
|
3 |
# 安装系统依赖
|
4 |
RUN apt-get update && \
|
5 |
apt-get install -y ca-certificates curl gnupg && \
|
6 |
+
apt-get clean && \
|
7 |
rm -rf /var/lib/apt/lists/*
|
8 |
|
9 |
# 克隆DeepClaude仓库
|
10 |
RUN git clone https://github.com/ErlichLiu/DeepClaude.git /app
|
11 |
WORKDIR /app
|
12 |
|
13 |
+
# 直接安装依赖(无需虚拟环境)
|
14 |
+
# 首先确保安装fastapi和uvicorn
|
15 |
+
RUN pip install --no-cache-dir fastapi uvicorn
|
16 |
|
17 |
+
# 如果仓库中有requirements.txt,则安装其中的依赖
|
18 |
+
RUN if [ -f requirements.txt ]; then \
|
19 |
+
pip install --no-cache-dir -r requirements.txt; \
|
20 |
+
fi
|
21 |
|
22 |
# 暴露Hugging Face默认端口
|
23 |
EXPOSE 7860
|
24 |
|
25 |
# 创建启动脚本
|
26 |
+
RUN echo '#!/bin/bash\nuvicorn app.main:app --host 0.0 --port 7860' > /app/start.sh && \
|
27 |
chmod +x /app/start.sh
|
28 |
|
29 |
# 启动服务
|