From bd59287bfb4827448c4eba13b35be85564e505ef Mon Sep 17 00:00:00 2001 From: Matthew Baxter Date: Tue, 17 Sep 2024 12:05:44 -0400 Subject: [PATCH] Update Dockerfile Install dependency packages before copying local files to make use of docker caching when modifying the contents of the repo --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5740556c..71b9a624 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,11 +5,6 @@ LABEL org.opencontainers.image.source = "https://github.com/hpcaitech/Open-Sora" LABEL org.opencontainers.image.licenses = "Apache License 2.0" LABEL org.opencontainers.image.base.name = "docker.io/library/hpcaitech/pytorch-cuda:2.1.0-12.1.0" -# Set the working directory -WORKDIR /workspace/Open-Sora -# Copy the current directory contents into the container at /workspace/Open-Sora -COPY . . - # inatall library dependencies RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y @@ -22,5 +17,10 @@ RUN pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolati # install xformers RUN pip install xformers --index-url https://download.pytorch.org/whl/cu121 +# Set the working directory +WORKDIR /workspace/Open-Sora +# Copy the current directory contents into the container at /workspace/Open-Sora +COPY . . + # install this project RUN pip install -v .