pranit144 commited on
Commit
624f3a9
·
verified ·
1 Parent(s): 19743e3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -9
Dockerfile CHANGED
@@ -1,20 +1,22 @@
1
- # Base image
2
- FROM python:3.9-slim
3
 
4
- # Set the working directory
5
  WORKDIR /app
6
 
7
- # Copy only the dependency file first to leverage Docker cache
8
  COPY requirements.txt .
9
 
10
- # Install dependencies (make sure python-dotenv and gunicorn are in requirements.txt)
 
 
 
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Copy the rest of the application files
14
  COPY . .
15
 
16
- # Expose the port your app runs on
17
  EXPOSE 7860
18
 
19
- # Command to run the application
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"]