FROM python:3.11-slim # Set up user with proper permissions RUN useradd -m -u 1000 streamlit WORKDIR /app USER streamlit # Install system dependencies RUN apt-get update && apt-get install -y \ curl \ git \ && rm -rf /var/lib/apt/lists/* # Install Node.js and npm for potential frontend needs RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - &&\ apt-get install -y nodejs # Install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the application files COPY . . # Expose the Streamlit port EXPOSE 7860 # Command to run the Streamlit app CMD ["streamlit", "run", "streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]