wodongdong commited on
Commit
bde7aab
·
verified ·
1 Parent(s): 26a56a6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +0 -7
Dockerfile CHANGED
@@ -11,15 +11,8 @@ WORKDIR /app
11
  RUN uv sync
12
 
13
  # 修改main.py文件
14
- # 只进行简单的字符串替换,不追加新代码块
15
- RUN sed -i 's/response = await gemini_client.generate_content(/response = await safe_generate_content(/g' /app/main.py # 先替换函数名
16
  RUN sed -i 's/await gemini_client.init(timeout=300)/await gemini_client.init(timeout=5000)/g' /app/main.py
17
- RUN sed -i '/import logging/a\import httpx\nfrom tenacity import retry, stop_after_attempt, wait_exponential' /app/main.py
18
 
19
-
20
- # 网络和凭证测试
21
- RUN curl -I https://generativelanguage.googleapis.com || echo "Network test failed"
22
- RUN echo "Checking credentials..." && [ -n "$SECURE_1PSID" ] && echo "SECURE_1PSID is set" || echo "SECURE_1PSID is not set"
23
  # 打印main.py内容以验证
24
  RUN cat /app/main.py
25
 
 
11
  RUN uv sync
12
 
13
  # 修改main.py文件
 
 
14
  RUN sed -i 's/await gemini_client.init(timeout=300)/await gemini_client.init(timeout=5000)/g' /app/main.py
 
15
 
 
 
 
 
16
  # 打印main.py内容以验证
17
  RUN cat /app/main.py
18