FROM python:3.9-slim RUN apt-get update && apt-get install -y \ build-essential \ ffmpeg \ && rm -rf /var/lib/apt/lists/* RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir \ torch==2.0.1 torchvision==0.15.2 \ diffusers==0.16.0 \ accelerate==0.21.0 \ transformers>=4.26.0 \ Pillow==9.4.0 \ opencv-python==4.8.0.76 # Set the working directory WORKDIR /app # Copy application files COPY . /app # Copy requirements and install Python dependencies RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r /app/requirements.txt # Expose the default Streamlit port EXPOSE 8501 # Command to run the app CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]