FROM python:3.9-slim ENV DEBIAN_FRONTEND noninteractive WORKDIR /content RUN apt-get update && \ apt-get install -y --no-install-recommends \ build-essential \ g++ \ && rm -rf /var/lib/apt/lists/* RUN apt-get update && apt-get install -y libgl1-mesa-glx RUN apt-get update && apt-get install -y libglib2.0-0 ADD . . RUN pip install --no-cache-dir -r ./requirements.txt RUN adduser --disabled-password --gecos '' user && \ chown -R user:user /content && \ chmod -R 777 /content USER user EXPOSE 7860 CMD ["python", "./app.py"]