Spaces:
Build error
Build error
File size: 1,058 Bytes
54a4c87 fc435ec 54a4c87 fc435ec 54a4c87 5eb3aa9 54a4c87 e13e9ee 54a4c87 cc3db52 54a4c87 fc435ec 54a4c87 fc435ec 54a4c87 5eb3aa9 cc3db52 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 33 34 35 36 37 38 |
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 curl libgl1 libglib2.0-0 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
# Configurar Gradio
RUN curl -fsL -o /usr/local/lib/python3.10/dist-packages/gradio/frpc_linux_amd64_v0.2 https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_linux_amd64 && \
chmod +x /usr/local/lib/python3.10/dist-packages/gradio/frpc_linux_amd64_v0.2
# Configurar diretórios e permissões
RUN adduser --disabled-password --gecos '' user && \
mkdir -p /content/app /content/data
RUN chown -R user:user /content
# Copiar código do aplicativo
COPY . /code/
# 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"]
|