Fayza38 commited on
Commit
053f261
·
verified ·
1 Parent(s): 9b5af42

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -20
Dockerfile CHANGED
@@ -1,21 +1,22 @@
1
- # Use an official Python runtime with GPU support if needed, or standard CPU
2
- FROM python:3.9
3
-
4
- # Set working directory
5
- WORKDIR /code
6
-
7
- # Install system dependencies for OpenCV and MediaPipe
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 and install
14
- COPY ./requirements.txt /code/requirements.txt
15
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
16
-
17
- # Copy the rest of the application
18
- COPY . .
19
-
20
- # Command to run the application
 
21
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use an official Python runtime
2
+ FROM python:3.9
3
+
4
+ # Set working directory
5
+ WORKDIR /code
6
+
7
+ # Install system dependencies for OpenCV and MediaPipe
8
+ # We replaced 'libgl1-mesa-glx' with 'libgl1' to fix the build error
9
+ RUN apt-get update && apt-get install -y \
10
+ libgl1 \
11
+ libglib2.0-0 \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Copy requirements and install
15
+ COPY ./requirements.txt /code/requirements.txt
16
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
17
+
18
+ # Copy the rest of the application
19
+ COPY . .
20
+
21
+ # Command to run the application (Hugging Face uses port 7860)
22
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]