randusertry commited on
Commit
3a47a7e
·
verified ·
1 Parent(s): a96d54a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # System deps (important for pdf parsing stability)
4
+ RUN apt-get update && apt-get install -y \
5
+ build-essential \
6
+ libxml2 \
7
+ libxslt1-dev \
8
+ zlib1g-dev \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Set working directory
12
+ WORKDIR /app
13
+
14
+ # Install Python deps first (better caching)
15
+ COPY requirements.txt .
16
+
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
+ # Copy app
20
+ COPY . .
21
+
22
+ # Expose FastAPI port
23
+ EXPOSE 7860
24
+
25
+ # Run app (HF Spaces expects port 7860)
26
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]