pytorch icon indicating copy to clipboard operation
pytorch copied to clipboard

Why don't we have a PyTorch-ROCM pip package like tensorflow?

Open iamkucuk opened this issue 6 years ago • 11 comments

🚀 Feature

PyTorch ROCM package as a pip package like tensorflow-rocm would be great.

Motivation

While it is already a pain for newer users to get things up and running, pytorch installation for rocm platform is just a lot for newer users. Since there is a tensorflow-rocm package for new users to easily download and install, I think PyTorch should have it too for the users who prefer pytorch over tensorflow.

Pitch

PyTorch ROCM package as a pip package like tensorflow-rocm would be great.

Alternatives

A conda package would be great too

iamkucuk avatar Dec 08 '18 18:12 iamkucuk

We are working on making this happen with upstream. Thanks for your request!

iotamudelta avatar Dec 10 '18 23:12 iotamudelta

We are working on making this happen with upstream. Thanks for your request!

I know you guys hate this question but it's kinda urgent so please forgive me for asking this:

Can you give any kind of eta for upstream?

Thanks for answering.

iamkucuk avatar Dec 11 '18 11:12 iamkucuk

We have upstreamed all ROCm enablement already. You can use the upstream repository on top of ROCm. Concerning the pip wheel: since that's outside our hands, unfortunately not.

In the meantime, I'd like to recommend our pre-build docker for Vega10, see https://github.com/ROCmSoftwarePlatform/pytorch/wiki/Running-PyTorch-on-ROCm . It's not quite as easy as a pip wheel but has the advantage that it comes with all ROCm dependencies bundled.

iotamudelta avatar Dec 11 '18 16:12 iotamudelta

We have upstreamed all ROCm enablement already. You can use the upstream repository on top of ROCm. Concerning the pip wheel: since that's outside our hands, unfortunately not.

In the meantime, I'd like to recommend our pre-build docker for Vega10, see https://github.com/ROCmSoftwarePlatform/pytorch/wiki/Running-PyTorch-on-ROCm . It's not quite as easy as a pip wheel but has the advantage that it comes with all ROCm dependencies bundled.

Even projects with 0 stars can be easily located in PyPi packages and installed via pip. But if you say it's not a thing the huge Rocm community cannot do, please forgive me I have a hard time to understand this.

I struggled 4 hours with docker images and containers last night. Can you please point out a tutorial how to work with docker containers with an IDE? I couldn't manage to get autocorrect work and I couldn't use the packages I installed using pip.

iamkucuk avatar Dec 12 '18 07:12 iamkucuk

docker exec -it -e DISPLAY=${DISPLAY} gracious_greider bash gracious_greider is my container name. -e DISPLAY=${DISPLAY} option allows the applications inside docker to display on your local GUI. After executing bash that way, just launch your IDE from within docker and it will display on your screen.

briansp2020 avatar Dec 12 '18 18:12 briansp2020

docker exec -it -e DISPLAY=${DISPLAY} gracious_greider bash gracious_greider is my container name. -e DISPLAY=${DISPLAY} option allows the applications inside docker to display on your local GUI. After executing bash that way, just launch your IDE from within docker and it will display on your screen.

I couldn't manage to install an IDE into the container. However, I could manage to use the docker image as interpreter with PyCharm. Now here's where I got stuck; I need to install additional packages with pip. However, as far as I understood, pip installations (or any kind of installations) in containers are not persistent. I tried to install whatever I want and build a new docker image with it and use it as the image I use for the interpreter container. It was a partial success. Oddly, the interpreter paths shows as empty with the newly created image. And because of that reason, IDE features like autocomplete is not working with the new image.

iamkucuk avatar Dec 12 '18 20:12 iamkucuk

docker image does not persist your changes unless you tag it. However, you don't have to start your docker instance from an image every time. docker run will run a container from an image. Hover, once you have a running container, it will persist whatever changes you make until you remove it. what do you see when you run the following commands?

docker ps -a

Maybe your PyCharm setup is running a fresh container every time?

briansp2020 avatar Dec 12 '18 21:12 briansp2020

docker image does not persist your changes unless you tag it. However, you don't have to start your docker instance from an image every time. docker run will run a container from an image. Hover, once you have a running container, it will persist whatever changes you make until you remove it. what do you see when you run the following commands?

docker ps -a

Maybe your PyCharm setup is running a fresh container every time?

Yeah it is true. PyCharm is running up a fresh container every time.

Well, I kinda solved the situation in a temporary way. I set up a container from original pytorch-rocm image, pip installed the needed packages, and created another image from that container. I did the same thing before, it diddn't work. Oddly, now it seems like working for now.

Any experience on PyCharm? Is there a way to run pycharm on same container instead of creating a new one everytime?

iamkucuk avatar Dec 13 '18 18:12 iamkucuk

Any updates on this?

bernharl avatar Feb 01 '21 07:02 bernharl

AMD provide a nightly building version of pytorch. Anybody who interesting in it, could have a try. https://github.com/ROCmSoftwarePlatform/pytorch/issues/716#issuecomment-755866685

xuhuisheng avatar Feb 01 '21 08:02 xuhuisheng

AMD provide a nightly building version of pytorch. Anybody who interesting in it, could have a try. #716 (comment)

Ah, great stuff. Thank you!

bernharl avatar Feb 01 '21 08:02 bernharl