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

Reducing downloads / decreasing build time #716

Open
ToeiRei opened this issue Nov 7, 2024 · 3 comments
Open

Reducing downloads / decreasing build time #716

ToeiRei opened this issue Nov 7, 2024 · 3 comments

Comments

@ToeiRei
Copy link

ToeiRei commented Nov 7, 2024

Hi guys,

I am building containers myself using jetson-containers build and it's "a tad slow" - so I decided to look at the build process; My 'benchmark image' is ollama as it builds relatively fast.

My first hurdle is the huge apt repo pull which I solved by having a repo with a local apt-cacher. Speeds things a bit with the builds.

Looking at the Dockerfile and the dependency files, there are - in the case of ollama

Is there a 'sane' way to cache or proxy those files?

As to my knowledge, squid won't help me there unless I intercept the HTTPS traffic (i.e. SSL bump) and thus get access to the decrypted content.

@ToeiRei ToeiRei changed the title Reducing downloads / increasing build time Reducing downloads / decreasing build time Nov 7, 2024
@dusty-nv
Copy link
Owner

dusty-nv commented Nov 8, 2024

@ToeiRei feel your pain, ollama isn't a great benchmark indicative of most packages though, because most are using pip and those get cached on my pip server at http://jetson.webredirect.org then you see that design pattern in the dockerfiles with install.sh trying to install these wheels, then falling back to build.sh if needed (wherein it uploads the wheels at the end)

This way has proven to scale for us across many packages, but some like ollama have different install processes that we try to remain compatible with as to avoid breaking changes. Ollama I typically have to update on a weekly or bi-weekly basis to keep it going...

@ToeiRei
Copy link
Author

ToeiRei commented Nov 8, 2024

Yeah, it's a pain as I want to get a lot stuff built locally.
Pip is the next thing I am able to cache here as well.

Staged builds really help if you're able to keep the images and all the layers. Sadly my ssd isn't too big so I'm forced to purge.
Also spotted some stuff coming in from nvidia which I'd love to cache as that stuff really slows down things...

@ms1design
Copy link
Contributor

What I would recommend is to own a local copy of Artifact Manager as @dusty-nv is hosting at http://jetson.webredirect.org. We ware already talking about this actually, as I want to issue a PR which will allow you to pass URLs to your own pypi/tarballs package repository on top of current config.

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

No branches or pull requests

3 participants