I made an AMD ROCm6.2 compatible docker file for AMD GPU users! #99
benhaotang
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
TL;DR
for all the torch ROCm6.2 supported GPUs (MI200,MI300,7900XT,7800XT,6900XT,etc.)
you should have everything running without any problem (I tested on Ubuntu 24.04 with my 7800XT)
Full method
build transformers-rocm with
python setup.py install
force install dependency version to not overwrite torch-rocm and scikit-learn-rocm Please always make sure torch torchvision and scikit learn are the original version from the rocm docker hub!!!! Never let other dependency overwrite it
It will complain "pip cannot consider all conflicts", just ignore the warning (because the torch-rocm in the docker image is an alpha build of 2.3.0, pip has problem resolving it.
python server.py --host 0.0.0.0 --port 8000 --documents --media --web
should run without any problemLast note
At current stage, I really suggest anyone running an AMD GPU to use the docker method instead of venv, docker files from ROCm has the most up-to-date but compatible dependencies, but to solve dependency problems in stable driver is just a mess. only downside is that the ROCm docker image is 56GB... so what ever you do, be prepared for a large sum of storage consumption.
I will also try to make a dockerfile and automate the pushing process with main repo when I am free recently.
Beta Was this translation helpful? Give feedback.
All reactions