-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing to build mmcv from source with cuda 12.1 #2860
Comments
I also an getting a similar error in trying to build |
Thanks for the notification. This is caused by nightly torch https://github.com/pytorch/pytorch/blob/main/aten/src/ATen/ATen.h Torch has update their c++ compatible since 2.1.0+. We will update the compatible of MMCV ASAP. |
Hello! Any updates on this? I cannot install mmcv, hence I cannot use any of the other tools like mmdetection or mmyolo (I want to try out RTMDet). I ran the following: mim install "mmcv>=2.0.0" And I get the following error: C:\anaconda3\envs\openmmlab\lib\site-packages\torch\include\c10/util/C++17.h(27): fatal error C1189: #error: You need C++17 to compile PyTorch I assume this is related to the issue posted by isobelm, hence I'm making a comment here. If you have a solution to this problem that I can try, that'd be great! Thanks for your hard work on this! |
Any updates? |
Hello! Would appreciate an update on this. Thanks! |
I haven’t yet since I thought that’s for building from source. I’m installing mmcv over mim, as directed in the mmdetection repo… I’m trying to use RTMDet. Is there a way to use mmcv from source with the changes you mentioned (without mim install)? Thanks! |
I was using mmPose, which also recommended installing via mim, I installed from source to get around the issues I was having installing from mim (probably the same ones you're having). As far as I know, you shouldn't have any issue using RTMDet if you install mmcv from source with the changes described in this thread, although I'm no expert. |
Oh awesome, will try that out! This is a very dumb question, but how do you connect mmcv to other mm repos after installing from source…? |
There are docs that describe how to build from source, just follow the instructions included and verify the installation and it'll work, there's no extra step to connect them: https://mmcv.readthedocs.io/en/latest/get_started/build.html#build-mmcv |
Awesome! Thanks! I’ll give this a shot :)) |
I'm trying to build using this Dockerfike: FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04 AS mmcv-builder
ENV FORCE_CUDA 1
ENV MMCV_WITH_OPS 1
RUN apt update && apt install -y python3 python3-pip git
ARG PYTORCH_VERSION=2.1.0.dev20230831+cu121
ARG TORCHVISION_VERSION=v0.16.0.dev20230831
RUN pip install --pre torch==$PYTORCH_VERSION torchvision==$TORCHVISION_VERSION --index-url https://download.pytorch.org/whl/nightly/cu121
RUN pip install openmim
RUN git clone --depth 1 --branch fix-cpp17 https://github.com/grimoire/mmcv
WORKDIR mmcv
RUN mim install . But getting this error:
|
Found the solution. |
when will the update completed? Very unconvenient for pytorch 2.1.0 users. |
What can I do to get past this error on Ubuntu? I'm trying to install ComfyUI Impact Pack on Ubuntu 23, and there's no way to enable MMCV because of this error. I believe it's related?
|
Hi @juWuBabaaaa , we will provide the pre-built packages for torch2.1 soon. |
Ended up installing 2.0.0 from source with the instructions in the GiHub, and replaced all "c++14" to "c++17" in setup.py before running install. |
I added statements for compiler selection in Cmakelist.txt and successfully compiled them, I hope it will be helpful to you
|
Prerequisite
Environment
Reproduces the problem - code sample
N/A
Reproduces the problem - command or script
Reproduces the problem - error message
Additional information
I have been unable to build mmcv from source in my current environment. This may be due to my Cuda version being to recent, but that is difficult to change as I do not have admin powers on the computer I'm using.
Should this be possible? Am I doing something wrong? Any help would be appreciated.
The text was updated successfully, but these errors were encountered: