File size: 894 Bytes
628b29b
 
7fa9d90
628b29b
 
1286799
7fa9d90
 
 
1286799
 
 
7fa9d90
 
59cf51d
 
 
1286799
7fa9d90
 
628b29b
7fa9d90
628b29b
7fa9d90
628b29b
 
7fa9d90
628b29b
7fa9d90
628b29b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# NCAkit - Neural Content Automation Toolkit

FROM python:3.9

# Install system dependencies (ffmpeg, imagemagick, fonts for video processing)
RUN apt-get update && apt-get install -y --no-install-recommends \
    ffmpeg \
    libsndfile1 \
    imagemagick \
    fonts-liberation \
    fonts-dejavu-core \
    && rm -rf /var/lib/apt/lists/*

# Fix ImageMagick policy to allow text rendering
# Use find to locate policy.xml as the path varies by version
RUN find /etc -name "policy.xml" -exec sed -i 's/none/read,write/g' {} +

RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"

WORKDIR /app

COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt

COPY --chown=user . /app

CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8880"]