# Use the official Python 3.10 slim image as the base FROM python:3.10-slim # Set environment variables ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 # Set the working directory in the container WORKDIR /app # Copy the requirements file into the container COPY requirements.txt /app/ # Install system dependencies RUN apt-get update && apt-get install -y \ gcc \ && rm -rf /var/lib/apt/lists/* # Install Python dependencies RUN pip install --upgrade pip \ && pip install --no-cache-dir -r requirements.txt # Copy the application code into the container COPY . /app/ # Expose the port Streamlit will run on EXPOSE 8501 # Set Streamlit's configuration to run on all interfaces ENV STREAMLIT_SERVER_ENABLECORS=false ENV STREAMLIT_SERVER_ENABLEWEBBROWSER=false ENV STREAMLIT_SERVER_PORT=8501 # Run the Streamlit app CMD ["streamlit", "run", "genAI.py", "--server.port=7860"]