FROM python:3.12-slim WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ build-essential \ curl \ && rm -rf /var/lib/apt/lists/* # Install CPU-only PyTorch (to save space and time) RUN pip3 install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu # Copy requirements COPY requirements.txt . # Install Python dependencies RUN pip3 install --no-cache-dir -r requirements.txt # Copy application code COPY . . # Make scripts executable RUN chmod +x start.sh # Expose ports EXPOSE 8501 EXPOSE 8000 # Entrypoint CMD ["./start.sh"]