hkai20000 commited on
Commit
d6e33e8
·
verified ·
1 Parent(s): 814010f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -28
Dockerfile CHANGED
@@ -1,28 +1,29 @@
1
- FROM python:3.10-slim
2
-
3
- WORKDIR /app
4
-
5
- # Install system dependencies for OpenCV and image processing
6
- RUN apt-get update && apt-get install -y \
7
- libgl1-mesa-glx \
8
- libglib2.0-0 \
9
- libsm6 \
10
- libxext6 \
11
- libxrender-dev \
12
- libgomp1 \
13
- && rm -rf /var/lib/apt/lists/*
14
-
15
- # Copy requirements first for better caching
16
- COPY requirements.txt .
17
-
18
- # Install Python dependencies
19
- RUN pip install --no-cache-dir -r requirements.txt
20
-
21
- # Copy application code
22
- COPY main.py .
23
-
24
- # Expose port (Hugging Face Spaces uses 7860)
25
- EXPOSE 7860
26
-
27
- # Run the application
28
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies for OpenCV and image processing
6
+ # Note: libgl1 replaces libgl1-mesa-glx in newer Debian
7
+ RUN apt-get update && apt-get install -y \
8
+ libgl1 \
9
+ libglib2.0-0 \
10
+ libsm6 \
11
+ libxext6 \
12
+ libxrender1 \
13
+ libgomp1 \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Copy requirements first for better caching
17
+ COPY requirements.txt .
18
+
19
+ # Install Python dependencies
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Copy application code
23
+ COPY main.py .
24
+
25
+ # Expose port (Hugging Face Spaces uses 7860)
26
+ EXPOSE 7860
27
+
28
+ # Run the application
29
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]