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