kamcio1989 commited on
Commit
958ea3d
·
verified ·
1 Parent(s): d03904f

Upload streamlit_app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. streamlit_app.py +23 -0
streamlit_app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Create a user with UID 1000
6
+ RUN adduser --disabled-password --gecos '' --uid 1000 streamlituser
7
+
8
+ # Copy requirements and install dependencies
9
+ COPY requirements.txt .
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ # Copy application code
13
+ COPY . .
14
+
15
+ # Change ownership to the streamlituser
16
+ RUN chown -R streamlituser:streamlituser /app
17
+
18
+ # Switch to the streamlituser
19
+ USER streamlituser
20
+
21
+ EXPOSE 7860
22
+
23
+ CMD ["streamlit", "run", "streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]