Skip to content

Commit

Permalink
reduce build size by mounting cache (#32)
Browse files Browse the repository at this point in the history
* use mount cache to install torch and merge uninstall/install

* apply yorick's suggestions
  • Loading branch information
technillogue authored Oct 28, 2024
1 parent 4c52f93 commit c610504
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cog.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c610504

Please sign in to comment.