Gagan0141 commited on
Commit
90c82f1
·
verified ·
1 Parent(s): 3c0a8f6

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.11.7
2
+ FROM python:3.11.7-slim
3
+
4
+ ENV PYTHONDONTWRITEBYTECODE=1
5
+ ENV PYTHONUNBUFFERED=1
6
+
7
+ WORKDIR /app
8
+
9
+ # Install OS dependencies
10
+ RUN apt-get update && apt-get install -y --no-install-recommends \
11
+ build-essential \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Copy dependency list
15
+ COPY requirements.txt .
16
+
17
+ # Install Python dependencies
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Copy entire project
21
+ COPY . .
22
+
23
+ # Expose port required by HuggingFace
24
+ EXPOSE 7860
25
+
26
+ # Run Flask app on 0.0.0.0:7860 (HF requirement)
27
+ CMD ["python", "app.py"]