Utkarsh524 commited on
Commit
be5acda
·
verified ·
1 Parent(s): 5596a1e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use official Python base image
2
+ FROM python:3.10-slim
3
+
4
+ # Set working directory inside the container
5
+ WORKDIR /app
6
+
7
+ # Copy all files to container
8
+ COPY . /app
9
+
10
+ # Install system dependencies (for PDF and NLP tools)
11
+ RUN apt-get update && apt-get install -y \
12
+ gcc \
13
+ libffi-dev \
14
+ libssl-dev \
15
+ poppler-utils \
16
+ && rm -rf /var/lib/apt/lists/*
17
+
18
+ # Install Python dependencies
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
+
21
+ # Download spaCy model (one-time)
22
+ RUN python -m spacy download en_core_web_trf
23
+
24
+ # Expose Streamlit default port
25
+ EXPOSE 7860
26
+
27
+ # Streamlit needs these environment vars to run on Hugging Face
28
+ ENV PORT=7860
29
+ ENV PYTHONUNBUFFERED=1
30
+
31
+ # Run your app
32
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]