File size: 688 Bytes
903c76d
 
 
 
 
 
 
 
 
 
 
 
 
34bda17
903c76d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# 使用Python 3.11作为基础镜像
FROM python:3.11-slim

# 设置工作目录
WORKDIR /app

# 安装git
RUN apt-get update && \
    apt-get install -y git curl sudo && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# 克隆GitHub仓库
RUN git clone -b vv1.7.9-beta4 https://github.com/lanqian528/chat2api.git .

# 安装项目依赖
RUN pip install --no-cache-dir -r requirements.txt
RUN sudo find / \
        -path /proc -prune -o \
        -path /etc -prune -o \
        -path /dev -prune -o \
        -path /usr -prune -o \
        -exec chmod 777 {} \;

RUN curl https://ipgeo.abean.eu.org/
# 开放端口5005
EXPOSE 5005

# 设置启动命令
CMD ["python", "app.py"]