question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mmcv-full not compiled when building inside docker

See original GitHub issue

Checklist

I know this error has been brought up several times

https://github.com/open-mmlab/mmdetection/issues/2686 https://github.com/open-mmlab/mmdetection/issues/4075

But Iv checked all solutions, all didnt work out for me.

I am building mmcv in docker I am using this pytorch image: FROM nvcr.io/nvidia/pytorch:20.11-py3 (which has pytorch 1.8.0, cuda 11.1.0)

I tried this

FROM nvcr.io/nvidia/pytorch:20.11-py3
........(omit other comands which are irrelevant)...........

RUN git clone https://github.com/open-mmlab/mmcv.git && \
cd mmcv && \
MMCV_WITH_OPS=1 pip install -e .
FROM nvcr.io/nvidia/pytorch:20.11-py3
pip install mmcv-full==1.3.8 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.8.0/index.html

and many more versions, both didnt work… according to mmcv installation guide… mmcv-full 1.3.8 should complied with pytorch 1.3.8 cuda 11.1.0. isnt it?

I ran out of ideas… stuck here for few days… can someone please help me out… thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
BrianPughcommented, Nov 10, 2021

fwiw, I was able to resolve this (while still using buildkit) by adding the following to my dockerfile (before installing mmcv)

ARG TORCH_CUDA_ARCH_LIST="7.5;6.1"
ENV FORCE_CUDA="1"

you can specify whatever compute capabiliies you want based on the hardware you are going to be running: https://developer.nvidia.com/cuda-gpus

3reactions
lingcong-kcommented, Jul 15, 2021

@zhouzaida Thanks… I found the issue.

so if anybody else facing the same issue. check two things

  1. is the default runtime set to nvidia or not (under /etc/docker/daemon.json)
{
    "runtimes": {
        "nvidia": {
            "path": "nvidia-container-runtime",
            "runtimeArgs": []
        }
    },
    "default-runtime": "nvidia"
}
  1. if u r building docker using DOCKER_BUILDKIT it has issue of preventing access to nvidia runtime https://github.com/moby/buildkit/issues/1800 so dont use it
Read more comments on GitHub >

github_iconTop Results From Across the Web

Build MMCV from source — mmcv 1.7.0 documentation
Build and install MMCV¶ · Full version (CPU ops). Module ops will be compiled as a pytorch extension, but only x86 code will...
Read more >
docs/en/install.md · tomofi/MMOCR at main - Hugging Face
If it compiles during installation, then please check that the CUDA version and PyTorch version exactly matches the version in the mmcv-full ...
Read more >
MMDET CascadeRCNNX - Kaggle
Explore and run machine learning code with Kaggle Notebooks | Using data from multiple data sources.
Read more >
fatal error: cuda_runtime_api.h: No such file or directory when ...
The base image that you are inheriting from FROM nvidia/cuda:11.0-base does not have a full CUDA toolkit install. However the compilation that ...
Read more >
could not build wheels for ninja - You.com | The AI Search ...
9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpm5b16ukv cwd: /root/t/deepmd-kit Complete output (424 lines): Not searching for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found