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 # clone 到 /app 目录本身,不是 /app/grok2api RUN git clone https://github.com/chenyme/grok2api /app # 现在 WORKDIR 和代码位置一致 WORKDIR /app RUN uv sync 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"]