sjmt commited on
Commit
d9a11db
·
verified ·
1 Parent(s): 2fbd444

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.11-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Copy the requirements.txt file into the container
8
+ COPY requirements.txt .
9
+
10
+ # Install any dependencies from requirements.txt
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Copy the current directory contents into the container at /app
14
+ COPY . .
15
+
16
+ # Expose the port the app runs on
17
+ EXPOSE 5000
18
+
19
+ # Set environment variables (optional, depending on your setup)
20
+ # For example, to disable buffering in Python output
21
+ ENV PYTHONUNBUFFERED=1
22
+
23
+ # Command to run the Flask app using gunicorn
24
+ CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "app:app"]`