# copiado do build do hugging face em 27/12/2025 FROM docker.io/library/python:3.10@sha256:ad84630de0e8b6f2ee92b4e2996b08c269efa96be13558d0233ed08a0e190606 # COPY --from=root / / COPY requirements.txt . WORKDIR /app RUN apt-get update && apt-get install -y git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1 \ && rm -rf /var/lib/apt/lists/* \ && git lfs install RUN pip install --no-cache-dir pip -U && pip install --no-cache-dir datasets "huggingface-hub>=0.30" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1" "pydantic~=1.0" RUN apt-get update && apt-get install -y curl && \ curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ apt-get install -y nodejs && \ rm -rf /var/lib/apt/lists/* && \ apt-get clean RUN --mount=target=/tmp/requirements.txt,source=requirements.txt pip install --no-cache-dir -r /tmp/requirements.txt # instala o gradio a partir do readm! COPY InstallFromReadme.sh . COPY README.md . RUN chmod +x InstallFromReadme.sh RUN ./InstallFromReadme.sh RUN pip install --no-cache-dir "uvicorn>=0.14.0" spaces RUN mkdir -p /home/user && ( [ -e /home/user/app ] || ln -s /app/ /home/user/app ) || true # -- o hf faz um --link. COPY . /app CMD ["python","app.py"]