Spaces:
Sleeping
Sleeping
File size: 681 Bytes
d2a174c d5aeacb d2a174c d5aeacb d0f0155 d2a174c d5aeacb d0f0155 d2a174c d5aeacb d0f0155 d2a174c 8604ad2 d2a174c d06f77f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
FROM python:3.9-slim
# Create non-root user for security
RUN useradd -m appuser && mkdir -p /app && chown -R appuser:appuser /app
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Create .streamlit directory and config file
RUN mkdir -p /app/.streamlit && chown appuser:appuser /app/.streamlit
COPY .streamlit/config.toml /app/.streamlit/
RUN chown appuser:appuser /app/.streamlit/config.toml
# Copy application files
COPY . .
# Switch to non-root user
USER appuser
# Set default port
ENV PORT=8501
EXPOSE 8501
CMD streamlit run app.py --server.port ${PORT} --server.fileWatcherType=none --logger.level=debug
|