File size: 639 Bytes
ecf6391
 
96f50aa
ecf6391
 
87996d0
6ea2ea4
ecf6391
 
 
87996d0
ecf6391
 
87996d0
 
 
 
ecf6391
 
96f50aa
 
 
ecf6391
 
 
 
 
 
96f50aa
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
FROM python:3.12-slim

RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
RUN pip install uv --no-cache-dir

# 克隆 v1.5.0 稳定版
RUN git clone --branch v1.5.3 https://github.com/chenyme/grok2api /app

WORKDIR /app

# 安装项目依赖
RUN uv sync

# --- 核心修复:显式安装 granian 确保命令存在 ---
RUN uv pip install granian
# --------------------------------------------

RUN mkdir -p /tmp/data /tmp/logs

COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh

ENV DATA_DIR=/tmp/data
ENV LOG_FILE_ENABLED=false
ENV LOG_LEVEL=INFO

EXPOSE 7860

CMD ["/app/entrypoint.sh"]