snailyp commited on
Commit
7c15c46
1 Parent(s): 31340f8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -5
Dockerfile CHANGED
@@ -1,9 +1,19 @@
1
- FROM snailyp/openai-compatible-balance
2
 
3
- EXPOSE 8000
 
 
 
 
 
4
 
 
 
 
5
  ENV BASE_URL=https://api.groq.com/openai/v1
6
- ENV ALLOWED_TOKENS=["123456"]
7
- ENV API_KEYS=["DDD"]
8
 
9
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
 
 
 
 
 
1
+ FROM python:3.9-slim
2
 
3
+ WORKDIR /app
4
+
5
+ # 复制所需文件到容器中
6
+ COPY ./app /app/app
7
+ COPY ./main.py /app
8
+ COPY ./requirements.txt /app
9
 
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+ ENV API_KEYS=["your_api_key_1"]
12
+ ENV ALLOWED_TOKENS=["your_token_1"]
13
  ENV BASE_URL=https://api.groq.com/openai/v1
 
 
14
 
15
+ # Expose port
16
+ EXPOSE 8000
17
+
18
+ # Run the application
19
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]