ROCm / pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration
http://pytorch.org
Other
219 stars 51 forks source link

Official Docker ROCm Pytorch images? Please support Python 3.x #444

Closed kinred closed 4 years ago

kinred commented 5 years ago

Hi, to me it is not clear where offical ROCm Pytorch docker images are hosted and which versions are currently available. I found this repo:

https://hub.docker.com/r/rocm/pytorch/tags

Is it the correct place?

If yes, it would be great if Python 3.x (or at least 3.6) would be supported in the latest images. Python 2 is already outdated for many code bases.

Thanks.

iotamudelta commented 5 years ago

We are working w/ upstream to switch over to py3.6 for ROCm officially.

briansp2020 commented 5 years ago

@iotamudelta Can you give us ETA? I'm interested in running fast.ai and it requires Python 3.6. So far, I have not been able to make it run successfully. In fact, with the latest git checkout, I can't even get it to compile. :( I was able to at least compile and run with ROCM 2.5 or earlier version (https://github.com/ROCmSoftwarePlatform/pytorch/issues/427) even though it did not produce expected result.

iotamudelta commented 5 years ago

@briansp2020 my PR to add the basic enablement landed. So you should be able to use just build. Let me give it a whirl myself. I'll report back.

iotamudelta commented 5 years ago

please pull rocm/pytorch:rocm2.5_ubuntu16.04_py3.6_pytorch , I've just built this from upstream and confirmed that all unit tests pass on Radeon VII.

briansp2020 commented 5 years ago

@iotamudelta Your docker container seems to work. Do you have instructions on how to compile it on rocm 2.6 docker container?

Also, is ROCm team interested in supporting fastai? Fastai now seems to require nvidia-ml-py3. I'm guessing that not having equivalent library is one of the reason why fastai seems to run on CPU most of the time.

saitam757 commented 5 years ago

Hi, I also tried the repo https://hub.docker.com/r/rocm/pytorch/tags and pulled the container with the tag _rocm2.7_ubuntu16.04_py3.6pytorch I got the error message ImportError: No module named 'torch' Should that container suppose to work ? Thanks.

iotamudelta commented 5 years ago

@saitam757 you need to use python3.6 instead of python (which defaults to 2.7 in this docker).

saitam757 commented 5 years ago

@iotamudelta Thanks, seems to work. I started my python script yesterday with python3 but I have to explicitly use python3.6

jithunnair-amd commented 5 years ago

@saitam757 Yes, the docker has python3.5 linked to "/usr/bin/python3" for whatever reason. If you change "/use/bin/python3" to point to python3.6 instead, then "python3" should also work as expected.

iotamudelta commented 4 years ago

Closing this as all official docker images are using python 3.6 now. Note that python3.6 must be invoked explicitly.