vinay0123 commited on
Commit
bb2a14f
·
verified ·
1 Parent(s): d0c453f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python base image
2
+ FROM python:3.10-slim
3
+
4
+ # Set environment variables
5
+ ENV PYTHONDONTWRITEBYTECODE=1
6
+ ENV PYTHONUNBUFFERED=1
7
+
8
+ # Set working directory
9
+ WORKDIR /app
10
+
11
+ # Copy project files
12
+ COPY response_1.py /app
13
+
14
+ # Install system dependencies
15
+ RUN apt-get update && apt-get install -y \
16
+ gcc \
17
+ git \
18
+ && rm -rf /var/lib/apt/lists/*
19
+
20
+ # Install Python dependencies
21
+ RUN pip install --no-cache-dir torch flask pandas scikit-learn
22
+
23
+ # Download the model or ensure it's created at runtime
24
+ # You can optionally use RUN commands to preload data if required.
25
+
26
+ # Expose port for Flask app
27
+ EXPOSE 7860
28
+
29
+ # Run Flask app
30
+ CMD ["python", "response_1.py"]