File size: 1,501 Bytes
54a4c87
 
fc435ec
 
 
54a4c87
fc435ec
c2771cc
 
 
54a4c87
 
 
5eb3aa9
54a4c87
 
e13e9ee
54a4c87
 
 
c2771cc
e87adbc
c2771cc
54a4c87
 
fc435ec
54a4c87
 
5eb3aa9
54a4c87
 
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
FROM nvidia/cuda:12.3.1-base-ubuntu22.04

ENV DEBIAN_FRONTEND noninteractive
ENV CMDARGS --listen

# Instalar dependências do sistema
RUN apt-get update -y && \
	apt-get install -y git python3-pip && \
	apt-get clean && \
	rm -rf /var/lib/apt/lists/*

# Criar diretório de trabalho
WORKDIR /code

# Instalar pygit2
RUN pip install pygit2==1.12.2

# Copiar código do aplicativo
COPY . /code/

# Instalar dependências Python
RUN pip install torchsde==0.2.5 einops==0.4.1 transformers==4.30.2 safetensors==0.3.1 accelerate==0.21.0 pyyaml==6.0 Pillow==9.2.0 scipy==1.9.3 tqdm==4.64.1 psutil==5.9.5 pytorch_lightning==1.9.4 omegaconf==2.2.3 gradio==3.41.2 pygit2==1.12.2 opencv-contrib-python==4.8.0.74 httpx==0.24.1 onnxruntime==1.16.3 timm==0.9.2 aiofiles==23.2.1 altair==5.3.0 annotated-types==0.6.0 anyio==4.3.0 attrs==23.2.0 certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 colorama==0.4.6 contourpy==1.2.1 cycler==0.12.1 dnspython==2.6.1 einops==0.8.0 email_validator==2.1.1 fastapi==0.111.0 fastapi-cli==0.0.3 ffmpy==0.3.2 filelock==3.14.0 fonttools==4.51.0 fsspec==2024.5.0 gradio==4.31.3 gradio_client==0.16.3 h11==0.14.0 httpcore==1.0.5 httptools==0.6.1 httpx==0.27.0 huggingface-hub==0.23.0 idna==3.7 importlib_resources==6.4.0 intel-openmp==2021.4.0 Jinja2==3.1.4

# Expor porta 7860
EXPOSE 7860

# Executar como usuário não root
USER user

# Comando de inicialização
CMD ["python", "entry_with_update.py", "--preset", "realistic", "--share", "--always-high-vram"]