Salimshakeel's picture
fixing
7cd255e
raw
history blame contribute delete
696 Bytes
FROM python:3.12-slim
ENV TORCH_HOME=/tmp/torch_cache
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
# Install ffmpeg along with other dependencies
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
ffmpeg \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r /code/requirements.txt
RUN adduser --disabled-password --gecos '' appuser \
&& mkdir -p /code/static/uploads \
&& mkdir -p /code/static/outputs \
&& chown -R appuser /code
COPY . .
RUN chown -R appuser /code
USER appuser
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]