Commit Graph

45 Commits

Author SHA1 Message Date
Eugene Brodsky
a636ac2899 (docker) use 'uv' to manage python installation and the invoke dependencies, since Ubuntu 24.04 comes with Python 3.12 which we do not yet support 2024-12-04 17:02:08 +00:00
Richard Lyons
bd478360d9 Upgrade docker build to ubuntu 24 2024-12-04 17:02:08 +00:00
Richard Lyons
ac0db07649 Fix docker deployment 2024-12-04 17:02:08 +00:00
Maximilian Maag
d85733f22b fix(installer): pytorch and ROCm versions are incompatible
Each version of torch is only available for specific versions of CUDA and ROCm.
The Invoke installer and dockerfile try to install torch 2.4.1 with ROCm 5.6
support, which does not exist. As a result, the installation falls back to the
default CUDA version so AMD GPUs aren't detected. This commits fixes that by
bumping the ROCm version to 6.1, as suggested by the PyTorch documentation. [1]

The specified CUDA version of 12.4 is still correct according to [1] so it does
need to be changed.

Closes #7006
Closes #7146

[1]: https://pytorch.org/get-started/previous-versions/#v241
2024-10-23 09:59:00 +11:00
Eugene Brodsky
d691f672a2 feat(docker): upgrade to CUDA 12.4 in container 2024-10-09 22:46:18 -04:00
brandonrising
daa5a88eb2 Update docker image to use pnpm version 8 2024-07-26 13:57:33 -04:00
Eugene Brodsky
35f847d5b7 fix(docker): add env vars for host and port to the Dockerfile 2024-03-21 10:34:52 -04:00
Eugene Brodsky
3278497674 feat(docker): remove separate pre-installation of PyTorch in the image 2024-03-21 10:34:52 -04:00
Copper Phosphate
c5aeb36230 fix: repair Dockerfile for ROCm
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.
2024-02-14 22:25:40 -05:00
Eugene Brodsky
968fb655a4
Report ci disk space + minor docker fixes (#5461)
* 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>
2024-01-10 05:20:26 +00:00
Sam
a4f9bfc8f7 Update Dockerfile 2023-12-19 18:38:36 -05:00
Sam
9afdd0f4a8 Update Dockerfile 2023-12-19 18:38:36 -05:00
Sam McLeod
bee6ad1547 fix(pnpm): replace npm with pnpm in dockerfile 2023-12-19 18:38:36 -05:00
Sam
11f4a48144 Add container GID 2023-12-11 14:30:40 -05:00
Sam
67ed4a0245 Respect CONTAINER_UID in Dockerfile chown
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.
2023-12-11 14:30:40 -05:00
Wilson E. Alvarez
76b3f8956b Fix ROCm support in Docker container 2023-11-06 13:47:08 -08:00
Eugene Brodsky
f102e38076 feat(docker): update docker image, etc. to python3.11+ubuntu23.04 2023-10-19 11:26:16 -04:00
Eugene Brodsky
0b0efa82e9 (docker) ROCm support fixes - contributed by @Rubonnek 2023-07-12 16:51:15 -04:00
Eugene Brodsky
d6da7ad922 (docker) dockerfile fixes including PR feedback
When previously using base Debian-ish images, the Invoke image
failed to find CUDA drivers on some RHEL-ish distributions
2023-07-12 16:51:15 -04:00
Brandon Rising
a674fff17a Update dockerignore, set venv to 3.10, pass cache to yarn vite buidl 2023-07-12 16:51:15 -04:00
Brandon Rising
674f42ba9a Pass env vars as build-args, ensure node modules isn't getting passed in 2023-07-12 16:51:15 -04:00
Eugene Brodsky
f3b45d0ad9 (docker) rewrite container implementation with docker-compose support
- 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
2023-07-12 16:51:15 -04:00
mauwii
2d9fac23e7
fix Dockerfile
- update broken paths after restructure
2023-03-04 23:51:07 +01:00
mauwii
92304b9f8a
remove pip-tools, still split requirements install
- also use user:group for definitions
- add `--platform=${TARGETPLATFORM}` to base
2023-02-26 00:53:43 +01:00
mauwii
90cda11868
separate installation of requirements and source
this should highly increase rebuilding of the image when:
- version did not change
- requirements didn't change
2023-02-24 03:51:18 +01:00
fattire
7aa6c827f7 fix minor typos 2023-02-14 17:38:21 -08:00
mauwii
7be5b4ca8b
update Dockerfile
- introduce build arg `VOLUME_DIR`
- fix permissions of the Volume
2023-02-10 22:55:19 +01:00
mauwii
2ea551d37d
create user home, expose port 2023-02-09 00:56:09 +01:00
mauwii
05d51d7b5b
re-use --link, lock pip cache 2023-02-08 23:45:15 +01:00
mauwii
a338af17c8
Initialize PIP_CACHE_DIR after setting the env 2023-02-08 23:17:15 +01:00
mauwii
888d3ae968
cleanup Dockerfile 2023-02-08 21:54:06 +01:00
mauwii
5bb0f9bedc
update Dockerfile - more simple user creation 2023-02-08 19:57:41 +01:00
mauwii
3833b28132 Create a new user for the container runtime
without root permission
2023-02-07 23:46:43 +01:00
mauwii
c2e11dfe83 update build-container.yml
- add long sha tag
- update cache-from
Dockerfile:
- re-use `apt-get update`
env.sh/build.sh:
- rename platform to lowercase
2023-02-07 09:27:20 +01:00
mauwii
17e1930229 remove CONTAINER_FLAVOR build arg
also disable currently unused PIP_PACKAGE build arg
will start using it when problems with XFORMERS are sorted out
2023-02-07 09:27:20 +01:00
mauwii
bde94347d3 don't use --linkin COPY 2023-02-07 09:27:20 +01:00
mauwii
9150f9ef3c move LABEL to top 2023-02-07 09:27:20 +01:00
mauwii
f0212cd361 update Dockerfile 2023-02-07 09:27:20 +01:00
mauwii
cdb3e18b80 add flavor to pip cache id
to prevent cache invalidation
2023-02-07 09:27:20 +01:00
mauwii
0402766f4d add author label 2023-02-06 14:05:27 +01:00
mauwii
1c197c602f update Dockerfile, .dockerignore and workflow
- dont build frontend since complications with QEMU
- set pip cache dir
- add pip cache to all pip related build steps
- dont lock pip cache
- update dockerignore to exclude uneeded files
2023-02-05 20:20:50 +01:00
mauwii
90656aa7bf update Dockerfile
- add build arg `FRONTEND_DIR`
2023-02-05 20:20:50 +01:00
mauwii
394b4a771e update Dockerfile
- remove yarn install args `--prefer-offline` and `--production=false`
2023-02-05 20:20:50 +01:00
mauwii
eb702a5049 fix env.sh, update Dockerfile, update build.sh
env.sh:
- move check for torch to CONVTAINER_FLAVOR detection

Dockerfile
- only mount `/var/cache/apt` for apt related steps
- remove `docker-clean` from `/etc/apt/apt.conf.d` for BuildKit cache
- remove apt-get clean for BuildKit cache
- only copy frontend to frontend-builder
- mount `/usr/local/share/.cache/yarn` in frountend-builder
- separate steps for yarn install and yarn build
- build pytorch in pyproject-builder

build.sh
- prepare for installation with extras
2023-02-05 20:20:50 +01:00
Matthias Wild
01a2b8c05b
Adapt latest changes to Dockerfile (#2478)
* remove non maintained Dockerfile

* adapt Docker related files to latest changes
- also build the frontend when building the image
- skip user response if INVOKE_MODEL_RECONFIGURE is set
- split INVOKE_MODEL_RECONFIGURE to support more than one argument

* rename `docker-build` dir to `docker`

* update build-container.yml
- rename image to invokeai
- add cpu flavor
- add metadata to build summary
- enable caching
- remove build-cloud-img.yml

* fix yarn cache path, link copyjob
2023-02-03 22:34:47 +00:00