AkhilRaja commited on
Commit
c463eb5
·
verified ·
1 Parent(s): 7d98633

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # Base Python image
3
+ FROM python:3.9-slim
4
+
5
+ # Avoid writing .pyc files
6
+ ENV PYTHONDONTWRITEBYTECODE=1
7
+
8
+ # Ensure logs appear immediately
9
+ ENV PYTHONUNBUFFERED=1
10
+
11
+ # Set working directory
12
+ WORKDIR /app
13
+
14
+ # Install system dependencies
15
+ RUN apt-get update && apt-get install -y build-essential && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Copy dependency file
18
+ COPY requirements.txt .
19
+
20
+ # Install Python dependencies
21
+ RUN pip install --upgrade pip
22
+ RUN pip install --no-cache-dir -r requirements.txt
23
+
24
+ # Copy application script
25
+ COPY app.py .
26
+
27
+ # Expose Hugging Face default port
28
+ EXPOSE 7860
29
+
30
+ # Run the application
31
+ CMD ["python", "app.py"]