From 9cdb6f03b8db96351321d68d54c3587878b00a64 Mon Sep 17 00:00:00 2001 From: Blanchon Date: Thu, 30 Nov 2023 15:32:23 +0100 Subject: [PATCH 1/2] Update Dockerfile Mount user cache to improve build time --- Dockerfile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index bfb282224..200370899 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,9 @@ ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/London RUN apt update && apt-get install -y software-properties-common -RUN add-apt-repository ppa:deadsnakes/ppa && \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + add-apt-repository ppa:deadsnakes/ppa && \ apt update && \ apt-get install -y git curl libgl1 libglib2.0-0 libgoogle-perftools-dev \ python3.10-dev python3.10-tk python3-html5lib python3-apt python3-pip python3.10-distutils && \ @@ -17,22 +19,22 @@ RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 3 RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3 WORKDIR /app -RUN python3 -m pip install wheel +RUN --mount=type=cache,target=/root/.cache/pip python3 -m pip install wheel # Todo: Install torch 2.1.0 for cu121 support (only available as nightly as of writing) -## RUN python3 -m pip install --pre torch ninja setuptools --extra-index-url https://download.pytorch.org/whl/nightly/cu121 +## RUN --mount=type=cache,target=/root/.cache/pip python3 -m pip install --pre torch ninja setuptools --extra-index-url https://download.pytorch.org/whl/nightly/cu121 # Todo: Install xformers nightly for Torch 2.1.0 support -## RUN python3 -m pip install -v -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers +## RUN --mount=type=cache,target=/root/.cache/pip python3 -m pip install -v -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers # Install requirements COPY ./requirements.txt ./requirements_linux_docker.txt ./ COPY ./setup/docker_setup.py ./setup.py -RUN python3 -m pip install -r ./requirements_linux_docker.txt -RUN python3 -m pip install -r ./requirements.txt +RUN --mount=type=cache,target=/root/.cache/pip python3 -m pip install -r ./requirements_linux_docker.txt +RUN --mount=type=cache,target=/root/.cache/pip python3 -m pip install -r ./requirements.txt # Replace pillow with pillow-simd -RUN python3 -m pip uninstall -y pillow && \ +RUN --mount=type=cache,target=/root/.cache/pip python3 -m pip uninstall -y pillow && \ CC="cc -mavx2" python3 -m pip install -U --force-reinstall pillow-simd # Fix missing libnvinfer7 From 0c3c0ac65ccbf2371fd0a234bd8c13068acf5382 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Dec 2023 05:43:16 +0000 Subject: [PATCH 2/2] Bump crate-ci/typos from 1.16.21 to 1.16.23 Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.21 to 1.16.23. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/v1.16.21...v1.16.23) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/typos.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/typos.yaml b/.github/workflows/typos.yaml index 11269e1e7..37f194d80 100644 --- a/.github/workflows/typos.yaml +++ b/.github/workflows/typos.yaml @@ -18,4 +18,4 @@ jobs: - uses: actions/checkout@v4 - name: typos-action - uses: crate-ci/typos@v1.16.21 + uses: crate-ci/typos@v1.16.23