Comments (11)
from everydream2trainer.
Here's what I use for xformers in docker, lmk if it needs something else, removed many lines specific to my setup. I'm unsure if ED2 needs bitsandbytes (8bit adam). You might also not need huggingface transformers if the repo doesnt rely on the diffusers lib.
FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04
LABEL maintainer="Tofu AI"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && \
apt install -y bash \
build-essential \
git \
git-lfs \
curl \
ca-certificates \
python3.8 \
python3-pip \
python3.8-venv && \
rm -rf /var/lib/apt/lists
# make sure to use venv (this might not be needed)
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
python3 -m pip install --no-cache-dir \
torch \
torchvision \
torchaudio \
--extra-index-url https://download.pytorch.org/whl/cu117 && \
python3 -m pip install --no-cache-dir \
accelerate \
datasets \
hf-doc-builder \
huggingface-hub \
modelcards \
numpy \
scipy \
tensorboard \
git+https://github.com/huggingface/transformers.git@main
RUN pip install ninja bitsandbytes
RUN pip install -v -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers
## install ED2 from here
``
## EDIT:
this did not take into consideration that ED2trainer needs Python 3.10 - I'm currently setting up an ECS instance (linux) with ED2 - will be able to post a install log here
from everydream2trainer.
things would be even easier with a requirements.txt file
from everydream2trainer.
Yeah the dependencies are a bit tricky, particularly xformers, I need to get runpod going then I can revisit linux/docker.
from everydream2trainer.
xformers, bitsandbytes an accellerate should all install fine via any official pytorch image. xformers requires you to build (via a pip command) if you don't use the conda repos, but it usally takes only 2 minutes.
EDIT:
trick to avoid xformers build failing due to a misisng nvcc is to use the developers version of pytorch docker images
from everydream2trainer.
could anyone attempt to make a docker image and if it works, share the Dockerfile here?
from everydream2trainer.
I use bits and bytes to support 8bit adam (significant performance improvement and ~1.5GB VRAM less) but that should be simple on linux, just install bitsandbytes 0.35.0, or newer versions may work as well on linux.
If bitsandbytes isn't installed, it will fall back to normal AdamW optimizer from torch, so its not strictly necessary. 8bit adamw is significantly faster though, and seems to be worth it.
from everydream2trainer.
I have it running fine with just installing the dependencies from I read in the bat file except the Windows stuff. The only tricky bit was that I had to update triton to get the xformers to work . (Ubuntu 20.4 lts)
from everydream2trainer.
The windows_setup.cmd could be pretty easily stripped to requirements.txt, the patch_bnb is not required, and a different xformers install would be needed. That's most if it. Getting xformers to work in the biggest pain point.
from everydream2trainer.
what's the issue with xformers you face? It installed just fine with the official instructions every time I installed it, hayppy to assist
from everydream2trainer.
Qslug has setup a container image here:
https://ghcr.io/qslug/ed2runpod
(should actually be agnostic to provider though, including a local docker instance)
Probably a few more hints here based on runpod/vast setup that could be useful for you:
https://github.com/victorchall/EveryDream2trainer/blob/main/doc/CLOUD_SETUP.md
from everydream2trainer.
Related Issues (20)
- [BUG]The current model class (GitModel) is not compatible with `.generate()`, as it doesn't have a language model head. Please use one of the following classes instead: {'GitForCausalLM'} HOT 5
- [BUG] Using --disable_unet_training massively increases VRAM usage and crashes on 12gb VRAM HOT 1
- [BUG] Checkpoint does not load in InvokeAI, `state_dic` issues HOT 1
- Reinstall HOT 1
- [BUG] HOT 1
- Multiple GPUs Parallel Trainning. HOT 3
- [ERROR] HOT 1
- [ERROR] Cannot install the requirements on Linux HOT 5
- [BUG]about multi-gpu training HOT 3
- [ERROR] Colab CUDA setup Error HOT 3
- Something went wrong, attempting to save model [ERROR]
- "RuntimeError: Input type (float) and bias type (struct c10::Half) should be the same" HOT 2
- Can no longer train my model. Getting Safety checker error HOT 2
- Feature request: Save checkpoint on exit HOT 2
- Colab error after running the first block[BUG] HOT 2
- [ERROR] unrecognized arguments: --useadam8bit HOT 1
- [ERROR]: finetuned model doesn't work with diffusers and comfyui HOT 2
- Discord url is outdated HOT 4
- [ERROR] Could not load library libcudnn_cnn_train.so.8. Error: /usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8: undefined symbol: _ZN5cudnn3cnn5infer22queryClusterPropertiesERPhS3_, version libcudnn_cnn_infer.so.8
- [BUG] RunPod Jupyter is Empty HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from everydream2trainer.