PrathameshRaut commited on
Commit
dc74bdb
·
verified ·
1 Parent(s): 64a9103

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -5
Dockerfile CHANGED
@@ -1,17 +1,22 @@
1
- FROM python:3.11-slim
2
 
3
- WORKDIR /app
4
-
5
- # Install system dependencies (Poppler needed for pdf2image)
6
  RUN apt-get update && apt-get install -y \
7
  poppler-utils \
8
  && rm -rf /var/lib/apt/lists/*
9
 
 
 
 
 
10
  COPY requirements.txt .
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
 
13
  COPY . .
14
 
 
15
  EXPOSE 7860
16
 
17
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
+ FROM python:3.9-slim
2
 
3
+ # Install system dependencies (Poppler for pdf2image)
 
 
4
  RUN apt-get update && apt-get install -y \
5
  poppler-utils \
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
+ # Set working directory
9
+ WORKDIR /app
10
+
11
+ # Copy requirements and install Python dependencies
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
+ # Copy app code and model
16
  COPY . .
17
 
18
+ # Expose port (Hugging Face Spaces uses 7860 by default)
19
  EXPOSE 7860
20
 
21
+ # Run the app using python -m uvicorn
22
+ CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]