|
|
FROM python:3.10-slim |
|
|
|
|
|
|
|
|
RUN apt-get update && \ |
|
|
apt-get install -y ffmpeg wget fontconfig fonts-roboto && \ |
|
|
rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
|
RUN mkdir -p /usr/share/fonts/truetype/custom |
|
|
|
|
|
|
|
|
RUN wget "https://github.com/rastikerdar/vazirmatn/raw/master/fonts/ttf/Vazirmatn-Bold.ttf" -O /usr/share/fonts/truetype/custom/Vazirmatn.ttf |
|
|
|
|
|
|
|
|
RUN wget "https://github.com/google/fonts/raw/main/ofl/lalezar/Lalezar-Regular.ttf" -O /usr/share/fonts/truetype/custom/Lalezar.ttf |
|
|
|
|
|
|
|
|
RUN wget "https://github.com/google/fonts/raw/main/ofl/bangers/Bangers-Regular.ttf" -O /usr/share/fonts/truetype/custom/Bangers.ttf |
|
|
|
|
|
|
|
|
|
|
|
RUN find /usr/share/fonts -name "Roboto-Bold.ttf" -exec cp {} /usr/share/fonts/truetype/custom/Roboto.ttf \; |
|
|
|
|
|
|
|
|
RUN fc-cache -fv |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
|
|
|
RUN mkdir -p /app/static /app/temp |
|
|
|
|
|
COPY requirements.txt . |
|
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
COPY . . |
|
|
RUN chmod -R 777 /app |
|
|
|
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |