subhrajit-mohanty commited on
Commit
0691155
·
verified ·
1 Parent(s): a1034af

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ build-essential \
8
+ curl \
9
+ software-properties-common \
10
+ git \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ # Copy requirements first for better caching
14
+ COPY requirements.txt .
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Copy the application code
18
+ COPY app.py .
19
+
20
+ # Set environment variables
21
+ ENV PORT=7860
22
+ ENV HOST=0.0.0.0
23
+
24
+ # Expose the port
25
+ EXPOSE 7860
26
+
27
+ # Command to run the application
28
+ CMD streamlit run app.py --server.port=7860 --server.address=0.0.0.0