-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Optimized Docker image for cloud and local use, with external model cache #1473
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
Conversation
|
Does the CUDA Image work for ATI as well? |
|
Do you mean AMD? i have no way to test, but I doubt it will, since AMD doesn't use CUDA... |
|
Yes, ment AMD, sorry, old man sitting here xD |
|
No worries, that's how I also knew what you meant 👴 ;) |
76362a8 to
03421d2
Compare
|
ohh. any hints for making the cache rehydration work with low-tech cheap remote GPU hosts like https://runpod.io (which doesn't expose any system config other than a docker image path)? |
|
I'm not familiar with runpod, but you should be able to run this very image with |
|
actually yeah that should work - thanks. |
0ab8972 to
e6a4aa4
Compare
|
@mauwii I made significant updates to the PR, rebased on latest in |
de4e86e to
d4efeb5
Compare
useful for cloud deployments. attempts to utilize docker layer caching as effectively as possible. also some quick tools to help with building
|
will reopen |
Sorry, I was sick the last days and did not open my MacBook at all 🤧 |
|
no problem @mauwii, hope you're feeling better. I opened a new PR that I'm currently testing on Runpod. |
|
I know, I already added a review which instead of lstein is no in my decission :-o And don't feel ofenden plz, because I updated my image now as well 🙈 |
|
@mauwii I don't feel offended, no worries. It does look like some of the ideas from this PR inspired the changes in your Dockerfile, but 🙈 😄 . I'm glad it helped. |
|
I started this way before your PR came in, then stopped it since the Models where far away from being centralized (would need to look in my fork if I have a PR about this, but I think you won't think I am lieing anyway ;P ) |
What this does
dockerwith the nvidia runtime, andmakefor convenience. (e.g. not even a localpythonis required). Fully tested on Linux only (Ubuntu 22.04/CUDA 11.7). Will most likely work on Windows/WSL2.git clonehappens inside docker build - only context is used$INVOKE_ROOTor--rootoptionsMakefilefor easy building/running (was quick to throw together, but it can be easily rewritten as bash or docker-compose, as this is currently not used in the project)INVOKE_ROOTcache on a cloud runner. No special privileges or secrets are required for image build/push.Testing/usage:
cd docker-buildmake load-models(Huggingface token will be prompted for if not already set via env var)make runhttp://localhost:9090~/invokeaidirectory which will be populated with the expectedINVOKE_ROOTcontentsThis PR does not touch any existing local docker setup to avoid surprises to existing users, except un-ignoring some paths from
.dockerignoreat build time. Should have no practical effect on existing users. But it can easily and optimally replace the existing docker setup. Future work can replaceMakefilewithdocker-compose, if desirable.