Spaces:
Running
Running
Commit
·
6c000ee
unverified
·
0
Parent(s):
Add files via upload
Browse files- Dockerfile +19 -0
- docker-compose.yml +14 -0
Dockerfile
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.11-slim
|
2 |
+
|
3 |
+
WORKDIR /app
|
4 |
+
|
5 |
+
# Install dependencies
|
6 |
+
COPY app/requirements.txt .
|
7 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
8 |
+
|
9 |
+
# Copy application code
|
10 |
+
COPY app/ .
|
11 |
+
|
12 |
+
# Create a directory for the credentials
|
13 |
+
RUN mkdir -p /app/credentials
|
14 |
+
|
15 |
+
# Expose the port
|
16 |
+
EXPOSE 8050
|
17 |
+
|
18 |
+
# Command to run the application
|
19 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8050"]
|
docker-compose.yml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
version: '3.8'
|
2 |
+
|
3 |
+
services:
|
4 |
+
openai-to-gemini:
|
5 |
+
build:
|
6 |
+
context: .
|
7 |
+
dockerfile: Dockerfile
|
8 |
+
ports:
|
9 |
+
- "8050:8050"
|
10 |
+
volumes:
|
11 |
+
- ./credentials:/app/credentials
|
12 |
+
environment:
|
13 |
+
- GOOGLE_APPLICATION_CREDENTIALS=/app/credentials/service-account.json
|
14 |
+
restart: unless-stopped
|