Spaces:
Running
Running
Upload streamlit_app.py with huggingface_hub
Browse files- 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"]
|