Update Dockerfile
Browse files- Dockerfile +10 -11
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
# Dockerfile (VERS脙O FINAL COM
|
| 2 |
|
| 3 |
# 1. COME脟AR COM A BASE CORRETA
|
| 4 |
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
|
|
@@ -19,7 +19,7 @@ RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86
|
|
| 19 |
# 4. ADICIONAR CONDA AO PATH
|
| 20 |
ENV PATH /opt/conda/bin:$PATH
|
| 21 |
|
| 22 |
-
# 5. COPIAR TODOS OS ARQUIVOS DO REPOSIT脫RIO
|
| 23 |
COPY . /app
|
| 24 |
WORKDIR /app
|
| 25 |
|
|
@@ -29,27 +29,26 @@ RUN yes | conda tos accept
|
|
| 29 |
# 7. ATUALIZAR O CONDA
|
| 30 |
RUN conda update -n base -c defaults conda
|
| 31 |
|
| 32 |
-
# 8. CRIAR O AMBIENTE CONDA
|
| 33 |
RUN conda env create -f environment.yml && conda clean --all -y
|
| 34 |
|
| 35 |
-
# 9. INSTALAR FLASH_ATTN
|
| 36 |
-
|
|
|
|
| 37 |
|
| 38 |
-
# 10. BAIXAR OS V脥DEOS DE EXEMPLO
|
| 39 |
WORKDIR /app/SeedVR
|
| 40 |
RUN wget -O 01.mp4 https://huggingface.co/datasets/Iceclear/SeedVR_VideoDemos/resolve/main/seedvr_videos_crf23/aigc1k/23_1_lq.mp4 && \
|
| 41 |
wget -O 02.mp4 https://huggingface.co/datasets/Iceclear/SeedVR_VideoDemos/resolve/main/seedvr_videos_crf23/aigc1k/28_1_lq.mp4 && \
|
| 42 |
wget -O 03.mp4 https://huggingface.co/datasets/Iceclear/SeedVR_VideoDemos/resolve/main/seedvr_videos_crf23/aigc1k/2_1_lq.mp4
|
| 43 |
|
| 44 |
-
# 11. BAIXAR O MODELO
|
| 45 |
RUN huggingface-cli download ByteDance-Seed/SeedVR2-3B --local-dir ckpts --local-dir-use-symlinks False
|
| 46 |
|
| 47 |
-
# 12. TORNAR O
|
| 48 |
-
# Voltamos para o diret贸rio raiz do app para encontrar o run.sh
|
| 49 |
WORKDIR /app
|
| 50 |
RUN chmod +x run.sh
|
| 51 |
|
| 52 |
-
# 13. DEFINIR O PONTO DE ENTRADA
|
| 53 |
-
# O WORKDIR final deve ser onde o app.py est谩
|
| 54 |
WORKDIR /app/SeedVR
|
| 55 |
CMD ["/app/run.sh"]
|
|
|
|
| 1 |
+
# Dockerfile (VERS脙O FINAL COM LIMITA脟脙O DE JOBS)
|
| 2 |
|
| 3 |
# 1. COME脟AR COM A BASE CORRETA
|
| 4 |
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
|
|
|
|
| 19 |
# 4. ADICIONAR CONDA AO PATH
|
| 20 |
ENV PATH /opt/conda/bin:$PATH
|
| 21 |
|
| 22 |
+
# 5. COPIAR TODOS OS ARQUIVOS DO REPOSIT脫RIO
|
| 23 |
COPY . /app
|
| 24 |
WORKDIR /app
|
| 25 |
|
|
|
|
| 29 |
# 7. ATUALIZAR O CONDA
|
| 30 |
RUN conda update -n base -c defaults conda
|
| 31 |
|
| 32 |
+
# 8. CRIAR O AMBIENTE CONDA
|
| 33 |
RUN conda env create -f environment.yml && conda clean --all -y
|
| 34 |
|
| 35 |
+
# 9. !!! A CORRE脟脙O FINAL !!! INSTALAR FLASH_ATTN USANDO APENAS 1 N脷CLEO
|
| 36 |
+
# Definimos MAX_JOBS=1 para for莽ar a compila莽茫o em s茅rie, evitando picos de mem贸ria.
|
| 37 |
+
RUN conda run -n seedvr env MAX_JOBS=1 pip install "flash_attn==2.5.9.post1" --no-build-isolation --no-cache-dir
|
| 38 |
|
| 39 |
+
# 10. BAIXAR OS V脥DEOS DE EXEMPLO
|
| 40 |
WORKDIR /app/SeedVR
|
| 41 |
RUN wget -O 01.mp4 https://huggingface.co/datasets/Iceclear/SeedVR_VideoDemos/resolve/main/seedvr_videos_crf23/aigc1k/23_1_lq.mp4 && \
|
| 42 |
wget -O 02.mp4 https://huggingface.co/datasets/Iceclear/SeedVR_VideoDemos/resolve/main/seedvr_videos_crf23/aigc1k/28_1_lq.mp4 && \
|
| 43 |
wget -O 03.mp4 https://huggingface.co/datasets/Iceclear/SeedVR_VideoDemos/resolve/main/seedvr_videos_crf23/aigc1k/2_1_lq.mp4
|
| 44 |
|
| 45 |
+
# 11. BAIXAR O MODELO
|
| 46 |
RUN huggingface-cli download ByteDance-Seed/SeedVR2-3B --local-dir ckpts --local-dir-use-symlinks False
|
| 47 |
|
| 48 |
+
# 12. TORNAR O SCRIPT DE INICIALIZA脟脙O EXECUT脕VEL
|
|
|
|
| 49 |
WORKDIR /app
|
| 50 |
RUN chmod +x run.sh
|
| 51 |
|
| 52 |
+
# 13. DEFINIR O PONTO DE ENTRADA
|
|
|
|
| 53 |
WORKDIR /app/SeedVR
|
| 54 |
CMD ["/app/run.sh"]
|