Emeritus-21 commited on
Commit
db402ad
·
verified ·
1 Parent(s): fca350e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use official Python 3.10 slim image
2
+ FROM python:3.10-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies for pillow and tensorflow
8
+ RUN apt-get update && apt-get install -y \
9
+ build-essential \
10
+ libglib2.0-0 \
11
+ libsm6 \
12
+ libxrender1 \
13
+ libxext6 \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Copy requirements and install Python dependencies
17
+ COPY requirements.txt .
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Copy all app files
21
+ COPY . .
22
+
23
+ # Expose the port your app runs on
24
+ EXPOSE 7860
25
+
26
+ # Run the Flask app
27
+ CMD ["python", "app.py"]