File size: 532 Bytes
94ba092
454b790
 
 
2ca496e
454b790
3930398
 
454b790
 
94ba092
454b790
ed37209
26a56a6
7688f58
ed37209
31e38d8
 
454b790
94ba092
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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"]