RajatMalviya commited on
Commit
ef8e2eb
·
verified ·
1 Parent(s): 45eb0e0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -2
Dockerfile CHANGED
@@ -1,17 +1,21 @@
1
  # Use a lightweight Python image
2
  FROM python:3.10-slim
3
 
 
 
 
4
  # Set the working directory inside the container
5
  WORKDIR /app
6
 
7
  # Copy and install dependencies
8
  COPY requirements.txt .
9
- RUN pip install --no-cache-dir -r requirements.txt
 
10
 
11
  # Copy the entire project
12
  COPY . .
13
 
14
- # Expose the port FastAPI runs on (must match CMD)
15
  EXPOSE 7860
16
 
17
  # Run FastAPI using Uvicorn
 
1
  # Use a lightweight Python image
2
  FROM python:3.10-slim
3
 
4
+ # Set environment variables to avoid Python buffering (better logging)
5
+ ENV PYTHONUNBUFFERED=1
6
+
7
  # Set the working directory inside the container
8
  WORKDIR /app
9
 
10
  # Copy and install dependencies
11
  COPY requirements.txt .
12
+ RUN pip install --no-cache-dir --upgrade pip && \
13
+ pip install --no-cache-dir -r requirements.txt
14
 
15
  # Copy the entire project
16
  COPY . .
17
 
18
+ # Expose the port FastAPI runs on
19
  EXPOSE 7860
20
 
21
  # Run FastAPI using Uvicorn