File size: 1,259 Bytes
0de0872
b1cbef8
0de0872
 
 
 
b1cbef8
0de0872
b1cbef8
4159dc2
0de0872
 
 
 
 
 
 
 
 
4159dc2
 
0de0872
 
 
4159dc2
 
 
 
 
0de0872
 
 
 
 
 
 
4159dc2
 
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
32
33
34
35
36
37
38
# 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"]