rahulbamniya's picture
Update Dockerfile
e131802 verified
raw
history blame contribute delete
487 Bytes
# Base image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Copy requirements first for caching
COPY requirements.txt .
# Install dependencies
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code
COPY . .
# Expose port for Streamlit
EXPOSE 8501
# Streamlit environment
ENV STREAMLIT_SERVER_HEADLESS=true
ENV STREAMLIT_SERVER_PORT=8501
ENV STREAMLIT_SERVER_ENABLECORS=false
# Run the app
CMD ["streamlit", "run", "app.py"]