xuhuisheng / rocm-gfx803

185 stars 9 forks source link

How To Get This Working On An 18.04-based System? #6

Open BloodyMess opened 2 years ago

BloodyMess commented 2 years ago

What would I need to do to get this working on my 18.04LTS-based system?

I'm running elementaryOS 5.1.7, and the only upgrade path to a 20.04-based system is a clean install. I can't afford to have my system down for any length of time, or lose any data, if something goes wrong with a full install.

My video card is an RX590.

xuhuisheng commented 2 years ago

What errors did you meet? If there is something like cannot find libtinfo.so.5, you can try create symble like ln -s /usr/local/lib/libtinfo.so.5 /usr/local/libtinfo.so.

And I suggest install docker and use ubuntu:20.04 image to test. You can use following command to mapping your gpu from host to container.

sudo docker run -dit --device=/dev/kfd --device=/dev/dri --security-opt seccomp=unconfined --name rocm500 ubuntu:20.04
BloodyMess commented 2 years ago

You were so insistent on people using 20.04, that I assumed there was a hard dependency on it somewhere in your scripts. So I wanted to know what I needed to do to work around it.

I'm trying it on 18.04 now.

One thing I've run into is that the scripts don't gracefully handle paths with spaces in the name. The variables need to be enclosed in double quotes when they are used in the scripts.

For instance lines 5 & 6 of 00.rocm-core.sh need to be like this:

mkdir -p "$ROCM_BUILD_DIR/rocm-core"
cd "$ROCM_BUILD_DIR/rocm-core"

There's probably more places besides those first few lines in the other scripts. I'm going through them now.

Also, I've created a convenience script to go through the scripts and execute them in order so I don't have to do it manually.

xuhuisheng commented 2 years ago

You can move this issue to https://github.com/xuhuisheng/rocm-build. I only test scripts on ubuntu-20.04, it costs times, so I suggest to use same environments. And docker is a good thing to unified our environments.

BloodyMess commented 2 years ago

You can move this issue to https://github.com/xuhuisheng/rocm-build. I only test scripts on ubuntu-20.04, it costs times, so I suggest to use same environments. And docker is a good thing to unified our environments.

Well, I've run into a couple of problems in your scripts: 1) All those instances of sudo apt install for various packages aren't OK. It's really bad to just haul off and install system-wide packages on your own. They really need to be removed, and the packages they install added to a list of dependencies/prerequisites in the readme file so the user can decide for themselves how to go about handling those things.

2) It turns out that you do have a hard dependency on 20.04 in the form of installing python-is-python3. I already have the symlink that that package creates, so I've just disabled it along with all the other instances of sudo apt install.