Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +11 -9
Dockerfile
CHANGED
|
@@ -1,20 +1,22 @@
|
|
| 1 |
-
#
|
| 2 |
-
FROM python:3.
|
| 3 |
|
| 4 |
-
# Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Copy only
|
| 8 |
COPY requirements.txt .
|
| 9 |
|
| 10 |
-
#
|
|
|
|
|
|
|
|
|
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
-
# Copy
|
| 14 |
COPY . .
|
| 15 |
|
| 16 |
-
# Expose the port your app
|
| 17 |
EXPOSE 7860
|
| 18 |
|
| 19 |
-
#
|
| 20 |
-
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"]
|
|
|
|
| 1 |
+
# Use a Python ≥3.10 image so google-generativeai and supabase install correctly
|
| 2 |
+
FROM python:3.11-slim
|
| 3 |
|
|
|
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Copy only requirements first to leverage layer caching
|
| 7 |
COPY requirements.txt .
|
| 8 |
|
| 9 |
+
# (Optional) Upgrade pip to latest
|
| 10 |
+
RUN pip install --no-cache-dir --upgrade pip
|
| 11 |
+
|
| 12 |
+
# Install dependencies
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
+
# Copy your app code
|
| 16 |
COPY . .
|
| 17 |
|
| 18 |
+
# Expose the port your app listens on
|
| 19 |
EXPOSE 7860
|
| 20 |
|
| 21 |
+
# Run with Gunicorn
|
| 22 |
+
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"]
|