InternImage icon indicating copy to clipboard operation
InternImage copied to clipboard

error in dcnv3_im2col_cuda: no kernel image is available for execution on the device

Open jeonga0303 opened this issue 1 year ago • 6 comments

Why am I getting these errors?

I installed DCNv3 in Docker via whl file. I want to avoid that error

python test.py err

image

jeonga0303 avatar May 24 '23 06:05 jeonga0303

I met the same error as I installed DCNv3 in conda env via whl file. Do you solve it ? If so, let me know.

SSZ1 avatar May 29 '23 09:05 SSZ1

I met the same error as I installed DCNv3 in conda env via whl file. Do you solve it ? If so, let me know.

I kept getting errors like that and ended up not using the whl installation file. Instead, we could proceed through dockerfile.

It was very difficult to install DCNv3 related to CUDA inside dockfile. Therefore, I made a sh file so that it can be installed when docker is running.

Add the following to the dockerfile. ADD start.sh . RUN chmod +x ./start.sh CMD ["./start.sh"]

And the sh file is as follows. #!/bin/sh cd /app/detection/ops_dcnv3 python setup.py install --user

finaly, let dockerfile build & docker-compose up

jeonga0303 avatar May 29 '23 23:05 jeonga0303

I met the same error as I installed DCNv3 in conda env via whl file. Do you solve it ? If so, let me know.

I kept getting errors like that and ended up not using the whl installation file. Instead, we could proceed through dockerfile.

It was very difficult to install DCNv3 related to CUDA inside dockfile. Therefore, I made a sh file so that it can be installed when docker is running.

Add the following to the dockerfile. ADD start.sh . RUN chmod +x ./start.sh CMD ["./start.sh"]

And the sh file is as follows. #!/bin/sh cd /app/detection/ops_dcnv3 python setup.py install --user

finaly, let dockerfile build & docker-compose up

Oh! Thanks a lot! I'll try.

SSZ1 avatar May 30 '23 01:05 SSZ1

这种情况还有一种隐藏的可能,InternImage代码是从别的服务器拷贝过来的,里面关于ops_dcnv3已经编译过了,在新环境安装的时候没有将旧的build 删掉。

monologuesmw avatar Jul 27 '23 06:07 monologuesmw

I met the same error as I installed DCNv3 in conda env via whl file. Do you solve it ? If so, let me know.

Before using the sh./make.sh, this technique worked for me, and I didn't get the same error: https://github.com/oobabooga/text-generation-webui/issues/1456#issuecomment-1561633919

itsMorteza avatar Jul 28 '23 04:07 itsMorteza

@jeonga0303 @SSZ1

To build the DCNV3 docker image with nvidia runtime follow the below steps:

  1. Install nvidia-container-runtime
sudo apt-get install nvidia-container-runtime
  1. Edit/create the /etc/docker/daemon.json with content
{
    "runtimes": {
        "nvidia": {
            "path": "/usr/bin/nvidia-container-runtime",
            "runtimeArgs": []
         } 
    },
    "default-runtime": "nvidia" 
}
  1. Restart docker daemon
sudo systemctl restart docker
  1. Build your image (now GPU will be available during build)
DOCKER_BUILDKIT=0 docker build -t my_image_name:latest .

Below is my success log

Capture

Source: https://stackoverflow.com/questions/59691207/docker-build-with-nvidia-runtime/61737404#61737404

MahendraSachindra avatar Oct 12 '23 05:10 MahendraSachindra