Pratik26Dec commited on
Commit
ec24518
·
verified ·
1 Parent(s): 6afee26

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a slim Python image as a base
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory inside the container
5
+ WORKDIR /app
6
+
7
+ # Copy the requirements file and install dependencies
8
+ COPY requirements.txt .
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
+
11
+ # Copy the Flask app and the serialized model
12
+ COPY app.py .
13
+ COPY extraalearn_best_model.joblib .
14
+
15
+ # Expose port 5000 for the Flask app
16
+ EXPOSE 5000
17
+
18
+ # Command to run the application using Gunicorn for production
19
+ CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]