shubham5524 commited on
Commit
8e8d783
·
verified ·
1 Parent(s): afd6ea6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -5
Dockerfile CHANGED
@@ -1,10 +1,14 @@
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
@@ -16,8 +20,8 @@ COPY . .
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"]
 
1
+ # Use a lightweight base image
2
  FROM python:3.10-slim
3
 
4
+ # Install system dependencies
5
  RUN apt-get update && apt-get install -y \
6
+ libglib2.0-0 \
7
  libgl1-mesa-glx \
8
+ libsm6 \
9
+ libxext6 \
10
+ libxrender-dev \
11
+ git \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
  # Set working directory
 
20
  # Install Python dependencies
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
+ # Expose the port used by FastAPI
24
  EXPOSE 7860
25
 
26
+ # Start the API
27
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]