mac9087 commited on
Commit
06031b4
·
verified ·
1 Parent(s): 733dbb8

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ build-essential \
8
+ git \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Copy requirements first for better caching
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Copy the rest of the application
16
+ COPY . .
17
+
18
+ # Create directories
19
+ RUN mkdir -p uploads results
20
+
21
+ # Set environment variables
22
+ ENV PORT=5000
23
+
24
+ # Expose the port
25
+ EXPOSE ${PORT}
26
+
27
+ # Run the application with gunicorn
28
+ CMD gunicorn --bind 0.0.0.0:${PORT} app:app