FROM python:3.9 WORKDIR /content RUN mkdir /content/cache/ RUN export TRANSFORMERS_CACHE=/content/cache/ COPY ./requirements.txt /content/requirements.txt RUN pip install --no-cache-dir --upgrade -r /content/requirements.txt RUN apt-get update RUN apt-get install -y ffmpeg COPY . . RUN adduser --disabled-password --gecos '' admin RUN adduser admin sudo RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers RUN chown -R admin:admin /content RUN chmod -R 777 /content USER admin EXPOSE 7860 CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]