Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce build size by mounting cache #32

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

technillogue
Copy link
Contributor

when #17 switched to uninstalling torch then reinstalling prerelease torch, it added cached wheels to the final image. by mounting the pip cache, we speed up builds and reduce final image size

@yorickvP
Copy link

How about just:

  python_packages:
    - "numpy<2"
    - "einops==0.8.0"
    - "fire >= 0.6.0"
    - "huggingface-hub==0.24.3"
    - "safetensors==0.4.3"
    - "sentencepiece==0.2.0"
    - "transformers==4.43.3"
    - "tokenizers==0.19.1"
    - "protobuf==5.27.2"
    - "diffusers==0.29.2"
    - "loguru==0.7.2"
    - "pybase64==1.4.0"
    - "pydash==8.0.3"
    - 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

@daanelson
Copy link
Collaborator

good stuff, I was hastily installing nightlies here and made some incorrect assumptions about how we deal with base images. @yorickvP think that's a lot cleaner; let's test that and merge if all looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants