From c6105045cd7b1b513ce718a2b30bb058e16a9f43 Mon Sep 17 00:00:00 2001 From: technillogue Date: Mon, 28 Oct 2024 13:42:10 -0400 Subject: [PATCH] reduce build size by mounting cache (#32) * use mount cache to install torch and merge uninstall/install * apply yorick's suggestions --- cog.yaml.template | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cog.yaml.template b/cog.yaml.template index 9d0008c..f54f6b5 100644 --- a/cog.yaml.template +++ b/cog.yaml.template @@ -23,12 +23,13 @@ build: - "loguru==0.7.2" - "pybase64==1.4.0" - "pydash==8.0.3" + # pinning to specific nightlies for release + - "https://download.pytorch.org/whl/nightly/cu124/torch-2.6.0.dev20240918%2Bcu124-cp311-cp311-linux_x86_64.whl" + - "https://download.pytorch.org/whl/nightly/cu124/torchaudio-2.5.0.dev20240918%2Bcu124-cp311-cp311-linux_x86_64.whl" + - "https://download.pytorch.org/whl/nightly/cu124/torchvision-0.20.0.dev20240918%2Bcu124-cp311-cp311-linux_x86_64.whl" + - "https://download.pytorch.org/whl/nightly/pytorch_triton-3.1.0%2B5fe38ffd73-cp311-cp311-linux_x86_64.whl" # commands run after the environment is setup run: - curl -o /usr/local/bin/pget -L "https://github.com/replicate/pget/releases/download/v0.8.2/pget_linux_x86_64" && chmod +x /usr/local/bin/pget - - pip uninstall -y torch torchvision torchaudio - # - pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu124 - # pinning to specific nightlies for release - - pip3 install https://download.pytorch.org/whl/nightly/cu124/torch-2.6.0.dev20240918%2Bcu124-cp311-cp311-linux_x86_64.whl https://download.pytorch.org/whl/nightly/cu124/torchaudio-2.5.0.dev20240918%2Bcu124-cp311-cp311-linux_x86_64.whl https://download.pytorch.org/whl/nightly/cu124/torchvision-0.20.0.dev20240918%2Bcu124-cp311-cp311-linux_x86_64.whl https://download.pytorch.org/whl/nightly/pytorch_triton-3.1.0%2B5fe38ffd73-cp311-cp311-linux_x86_64.whl