AI_VID / Dockerfile
arif670's picture
Update Dockerfile
68ae23c verified
raw
history blame contribute delete
625 Bytes
FROM python:3.10-slim
RUN apt-get update && apt-get install -y \
ffmpeg \
libgl1 \
libglib2.0-0 \
libsm6 \
libxext6 \
fontconfig \
fonts-dejavu \
libopenblas-base \
&& rm -rf /var/lib/apt/lists/*
ENV MPLCONFIGDIR=/tmp/matplotlib \
FONTCONFIG_PATH=/tmp/fontconfig \
XDG_CACHE_HOME=/tmp \
PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.9
RUN mkdir -p ${MPLCONFIGDIR} ${FONTCONFIG_PATH} && \
chmod -R 777 /tmp
WORKDIR /app
COPY . .
RUN pip install --no-cache-dir -U pip && \
pip install --no-cache-dir -r requirements.txt
EXPOSE 7860
CMD ["python", "app.py"]