640510702phithak commited on
Commit
2f54d30
·
verified ·
1 Parent(s): 33103d5

Update Dockerfile

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