With these changes, the Docker image can be built and executed
successfully on hosts with AMD devices with ROCm acceleration.
Previously, a ROCm-enabled version of torch would be installed, but
later removed during installation of InvokeAI itself. This was caused by
InvokeAI needing a newer torch version than was previously installed.
The fix consists of multiple components:
* Update the hardcoded versions of torch and torchvision to the versions
currently used in pyproject.toml, so that a new version need not be
installed during installation of InvokeAI.
* Specify --extra-index-url on installation of InvokeAI so that even if
a verison mismatch occurs, the correct torch version should still be
installed. This also necessitates changing --index-url to
--extra-index-url for the Torch repo. Otherwise non-torch dependencies
would not be found.
* In run.sh, build the image for the selected service.
* ci: add docker build timout; log free space on runner before and after build
* docker: bump frontend builder to node=20.x; skip linting on build
* chore: gitignore .pnpm-store
* update code owners for docker and CI
---------
Co-authored-by: Millun Atluri <Millu@users.noreply.github.com>
* Update docker-compose.yml to bind local data path
* Update LOCAL_DATA_PATH in .env.sample
* Add fallback to INVOKEAI_ROOT envar if LOCAL_DATA_PATH not present.
* rename LOCAL_DATA_PATH to INVOKAI_LOCAL_ROOT
* Whoops, didnt mean to include this
* Update docker/docker-compose.yml
Co-authored-by: Eugene Brodsky <ebr@users.noreply.github.com>
* [chore] rename envar
* Apply suggestions from code review
---------
Co-authored-by: Eugene Brodsky <ebr@users.noreply.github.com>
CONTAINER_UID is used for the user ID within the container, however I noticed the UID was hard coded to 1000 in the Dockerfile chown -R command.
This leaves the default as 1000, but allows it to be overrriden by setting CONTAINER_UID.
- rewrite Dockerfile
- add a stage to build the UI
- add docker-compose.yml
- add docker-entrypoint.sh such that any command may be used at runtime
- docker-compose adds .env support - add a sample .env file