shubham5524 commited on
Commit
a5fdc74
·
verified ·
1 Parent(s): 9cfc805

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -10
Dockerfile CHANGED
@@ -1,20 +1,23 @@
1
- FROM python:3.10
2
-
3
- ENV DEBIAN_FRONTEND=noninteractive
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
- libgl1 \
7
- libglib2.0-0 \
8
- ffmpeg \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
11
  WORKDIR /app
12
 
13
- COPY . /app
 
14
 
15
- RUN pip install --upgrade pip
16
- RUN pip install -r requirements.txt
17
 
 
18
  EXPOSE 7860
19
 
20
- CMD ["python", "app.py"]
 
 
1
+ # Base image
2
+ FROM python:3.10-slim
 
3
 
4
+ # System dependencies
5
  RUN apt-get update && apt-get install -y \
6
+ git \
7
+ libgl1-mesa-glx \
 
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
+ # Set working directory
11
  WORKDIR /app
12
 
13
+ # Copy project files
14
+ COPY . .
15
 
16
+ # Install Python dependencies
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
 
19
+ # Expose the FastAPI port
20
  EXPOSE 7860
21
 
22
+ # Run the FastAPI app
23
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]