nagpalsumit247 commited on
Commit
50f77bf
·
verified ·
1 Parent(s): 635067c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -8
Dockerfile CHANGED
@@ -2,23 +2,22 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies required by PaddleOCR
6
  RUN apt-get update && apt-get install -y \
7
  libgl1 \
8
  libglib2.0-0 \
9
  libgomp1 \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # Install Python dependencies
13
  COPY requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- # Copy application code
17
- COPY . . .
18
 
19
-
20
- # Hugging Face ONLY listens on 7860
21
  EXPOSE 7860
22
 
23
- # Run FastAPI on Hugging Face port
24
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # System deps for OCR & OpenCV
6
  RUN apt-get update && apt-get install -y \
7
  libgl1 \
8
  libglib2.0-0 \
9
  libgomp1 \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Python deps
13
  COPY requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
+ # App code
17
+ COPY . .
18
 
19
+ # Hugging Face listens on 7860
 
20
  EXPOSE 7860
21
 
22
+ # Correct ASGI entrypoint
23
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]