lucianotonet commited on
Commit
54a4c87
1 Parent(s): f59560c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -17
Dockerfile CHANGED
@@ -1,30 +1,37 @@
1
- FROM docker.io/nvidia/cuda:12.3.1-base-ubuntu22.04@sha256:6a7febf317514458233b87819ce47d5441357dd7763e91800c35f6745f34bbbd
 
2
  ENV DEBIAN_FRONTEND noninteractive
3
  ENV CMDARGS --listen
4
 
 
5
  RUN apt-get update -y && \
6
- apt-get install -y curl libgl1 libglib2.0-0 python3-pip python-is-python3 git && \
7
- apt-get clean && \
8
- rm -rf /var/lib/apt/lists/*
 
 
 
9
 
10
- COPY --from=build /tmp/requirements_docker.txt /tmp/
11
- RUN pip install --no-cache-dir -r /tmp/requirements_docker.txt && \
12
- rm -f /tmp/requirements_docker.txt
13
 
14
- RUN pip install --no-cache-dir xformers==0.0.23 --no-dependencies
15
  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 && \
16
- chmod +x /usr/local/lib/python3.10/dist-packages/gradio/frpc_linux_amd64_v0.2
17
 
 
18
  RUN adduser --disabled-password --gecos '' user && \
19
- mkdir -p /content/app /content/data
20
-
21
- COPY --from=build /entrypoint.sh /content/
22
  RUN chown -R user:user /content
23
 
24
- WORKDIR /content
25
- USER user
 
 
 
26
 
27
- RUN git clone https://github.com/lllyasviel/Fooocus /content/app
28
- RUN mv /content/app/models /content/app/models.org
29
 
30
- CMD [ "sh", "-c", "/content/entrypoint.sh ${CMDARGS}" ]
 
 
1
+ FROM nvidia/cuda:12.3.1-base-ubuntu22.04
2
+
3
  ENV DEBIAN_FRONTEND noninteractive
4
  ENV CMDARGS --listen
5
 
6
+ # Instalar dependências do sistema
7
  RUN apt-get update -y && \
8
+ apt-get install -y curl libgl1 libglib2.0-0 git python3-pip && \
9
+ apt-get clean && \
10
+ rm -rf /var/lib/apt/lists/*
11
+
12
+ # Criar diretório de trabalho
13
+ WORKDIR /code
14
 
15
+ # Instalar pygit2
16
+ RUN pip install pygit2==1.12.2
 
17
 
18
+ # Configurar Gradio
19
  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 && \
20
+ chmod +x /usr/local/lib/python3.10/dist-packages/gradio/frpc_linux_amd64_v0.2
21
 
22
+ # Configurar diretórios e permissões
23
  RUN adduser --disabled-password --gecos '' user && \
24
+ mkdir -p /content/app /content/data
 
 
25
  RUN chown -R user:user /content
26
 
27
+ # Copiar código do aplicativo
28
+ COPY . /code/
29
+
30
+ # Expor porta 7860
31
+ EXPOSE 7860
32
 
33
+ # Executar como usuário não root
34
+ USER user
35
 
36
+ # Comando de inicialização
37
+ CMD ["python", "entry_with_update.py", "--preset", "realistic", "--share", "--always-high-vram"]