|
FROM python:3.9 |
|
RUN apt update && apt install -y libgl1-mesa-glx |
|
USER root |
|
COPY . . |
|
|
|
|
|
RUN apt install -y imagemagick |
|
ENV IMAGEMAGICK_BINARY=/usr/bin/convert |
|
|
|
|
|
|
|
RUN cp -f ./custom-imagemagick-policy.yml /etc/ImageMagick-6/policy.xml |
|
RUN sed -i 's/none/read,write/g' /etc/ImageMagick-6/policy.xml |
|
|
|
|
|
|
|
RUN apt install -y ffmpeg |
|
ENV FFMPEG_BINARY=/usr/bin/ffmpeg |
|
|
|
RUN pip install -U pip |
|
|
|
|
|
RUN pip install -r requirements.txt |
|
|
|
|
|
|
|
|
|
|
|
RUN mkdir output |
|
RUN chmod -R 777 /output |
|
RUN mkdir -m 777 -p manga manga1 manga12 |
|
|
|
RUN mkdir -m 777 -p mp3_out |
|
|
|
RUN mkdir -m 777 -p mp4_out |
|
|
|
RUN mkdir -m 777 -p cover |
|
|
|
EXPOSE 7860 |
|
|
|
|
|
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"] |
|
|
|
|
|
|
|
|
|
|
|
|