gmn2api / Dockerfile
wodongdong's picture
Update Dockerfile
bde7aab verified
raw
history blame contribute delete
532 Bytes
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
RUN apt-get update && apt-get install -y git
RUN git clone https://github.com/zhiyu1998/Gemi2Api-Server.git /app
RUN mkdir /.cache && chmod -R 777 /.cache
WORKDIR /app
RUN uv sync
# 修改main.py文件
RUN sed -i 's/await gemini_client.init(timeout=300)/await gemini_client.init(timeout=5000)/g' /app/main.py
# 打印main.py内容以验证
RUN cat /app/main.py
# Command to run the application
CMD ["uv", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]