lamikr / rocm_sdk_builder

Other
132 stars 12 forks source link

Unable to build onnxruntime (40_01) #18

Closed daniandtheweb closed 4 months ago

daniandtheweb commented 4 months ago

The system I'm using is Ubuntu 23.10 running in distrobox (podman container) and building for 5700XT. I'm unable to build onnxruntime as it doesn't allow running as root to do it, however when running the build command without root it can't install the package so there's no way to get past this step.

daniandtheweb commented 4 months ago

Apparently it gets fixed by adding --allow_running_as_root to the build command of onnxruntime.

lamikr commented 4 months ago

Nice, It seems you got the build finished?

So in distrobox you do not specify sudo rights? If you have some trace from the location where onnxruntime needed root access, that could be useful for some future improvements.

Are you now able access the GPU from this distrobox container or are you running build binaries now afterwards from the host Linux? For example does this work for getting info from the GPU?

# source /opt/rocm_sdk_611/bin/env_rocm.sh
# rocminfo
daniandtheweb commented 4 months ago

I think the only requirement for root access is to be able to write the opt folder. On arch and Ubuntu the default access is just root to that so I've never changed it.

The build works mostly fine, I'll run some more tests later but for now I've been able to run stable diffusion fp16 with no problems.

For now I've just used the container to avoid losing time checking all the dependencies on arch.

lamikr commented 4 months ago

Nice. If you have later time to check some of the Arch build dependencies and if they can be added to install_debs.sh, those could be included.

And at least for the creation of /opt/rocm_sdk_xxx folder the babs.sh could propably somehow check whether sudo is supported and if not, then try to do something to avoid it's usage.

daniandtheweb commented 4 months ago

Unfortunately writing in /opt/ should be root only so the best thing in my opinion could be building in a separate folder and just calling sudo to actually install by copying the files. I've still haven't checked the installs commands so I'm not sure if that's doable.

As for the arch dependencies if I have time I'll check them later, it would be great to access the full rocm without a container.

daniandtheweb commented 4 months ago

I may have broken the install myself as I've run the install command with root commands from the start. I'm rebuilding everything from scratch in order to test Arch (this time without root), so if I come up with the same issue I'll just reopen this.