Kashaf23 commited on
Commit
edbdb81
·
verified ·
1 Parent(s): 8db1a99

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -0
Dockerfile ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # System dependencies
4
+ RUN apt-get update && apt-get install -y \
5
+ wget \
6
+ curl \
7
+ git \
8
+ build-essential \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # (Optional) Chrome install
12
+ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
13
+ && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list \
14
+ && apt-get update && apt-get install -y google-chrome-stable \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Set working directory
18
+ WORKDIR /app
19
+
20
+ # Copy requirements first (better Docker caching)
21
+ COPY requirements.txt .
22
+
23
+ RUN pip install --upgrade pip
24
+ RUN pip install --no-cache-dir -r requirements.txt
25
+
26
+ # Copy app files
27
+ COPY . .
28
+
29
+ # Expose HF default port
30
+ EXPOSE 7860
31
+
32
+ # Start app
33
+ CMD ["python", "app.py"]