Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +9 -7
Dockerfile
CHANGED
|
@@ -1,15 +1,17 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 5 |
COPY requirements.txt .
|
| 6 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 7 |
|
| 8 |
-
|
| 9 |
-
COPY
|
| 10 |
-
COPY client_api_keys.json /app/
|
| 11 |
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
CMD ["python", "main.py"]
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Set work directory
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Install dependencies
|
| 7 |
COPY requirements.txt .
|
| 8 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 9 |
|
| 10 |
+
# Copy source code
|
| 11 |
+
COPY . .
|
|
|
|
| 12 |
|
| 13 |
+
# Expose port
|
| 14 |
+
EXPOSE 7860
|
| 15 |
|
| 16 |
+
# Start FastAPI server
|
| 17 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|