Kiruthikaramalingam commited on
Commit
3e30d2f
·
verified ·
1 Parent(s): 03463db

Create dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +20 -0
dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python slim image
2
+ FROM python:3.9-slim
3
+
4
+ # Add a non-root user
5
+ RUN useradd -m -u 1000 user
6
+ USER user
7
+ ENV PATH="/home/user/.local/bin:$PATH"
8
+
9
+ # Set working directory
10
+ WORKDIR /app
11
+
12
+ # Copy and install dependencies
13
+ COPY --chown=user requirements.txt ./requirements.txt
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Copy the app code
17
+ COPY --chown=user . /app
18
+
19
+ # Start the Streamlit app on port 7860
20
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]