Open MTDzi opened 2 years ago
Hi,
Thanks for your appreciation!
Installing the correct dependencies for torch_geometric is kind of tricky. Can you share the error message? I'll try my best to help you! :-)
Best Regards, Jianbang
Hmmm... so I did run into a bunch of different errors, all of them were caused by some mismatch in the versions (and I tried the requirements.txt but maybe it also requires the proper CUDA version? IDK, either way it didn't work).
And I wanted to share the setup that worked for me personally, so that anyone in the future might benefit from it.
The Dockerfile that worked for me is essentially the following (it's a bit WIP, but the hardest part is there):
ARG FROM_IMAGE_NAME=nvcr.io/nvidia/pytorch:20.12-py3
FROM ${FROM_IMAGE_NAME}
RUN update-alternatives --install /usr/bin/python python $(which python3) 1
RUN pip3 install --upgrade pip && pip3 install \
torch==1.9.1+cu111 \
torchaudio \
-f https://download.pytorch.org/whl/cu111/torch_stable.html
RUN pip3 install --upgrade pip && pip3 install \
lmdb \
torch-scatter==2.0.9 \
-f https://pytorch-geometric.com/whl/torch-1.9.1+cu111.html
RUN pip3 install --upgrade pip && pip3 install \
torch-sparse==0.6.12 \
-f https://pytorch-geometric.com/whl/torch-1.9.1+cu111.html
RUN pip3 install --upgrade pip && pip3 install torch-geometric==1.7.2
RUN git clone https://github.com/argoai/argoverse-api && pip3 install argoverse-api/
RUN pip3 uninstall -y opencv-python && pip3 install opencv-python
So the question is: would you guys benefit from a PR with a Dockerfile (a more polished version than the one above)? Or do you simply don't work in a devcontainer and there's no need for that?
I believe many of us users are also struggling with torch_geometric dependencies. We would definitely benefit from a Dockerfile.
First of all: awesome work, really appreciate it! :)
Second: I was trying to get it to work but I was facing issues installing the right versions of the dependencies, so I figured I'll create a docker image that might work not only for me.
If you guys are interested, I can create a PR with the Dockerfile that worked for me.