FROM pytorch/pytorch:latest WORKDIR /app # Install system dependencies required by OpenCV RUN apt-get update && apt-get install -y \ libglib2.0-0 \ libsm6 \ libxrender1 \ libxext6 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* COPY . . RUN pip install -r requirements.txt ENV PORT=7860 EXPOSE 7860 CMD [ "python", "app.py" ]