Installation of WebODM GPU doesn't detect NVIDIA MX150

Hello, I have followed this installation guide GPU Point Cloud Densification Lands in ODM, and It's Fast! - OpenDroneMap

cd WebODM
./webODM.sh start --gpu

the result, WebODM use NodeODM:gpu.intel instead nvidia

/webodm.sh start --gpu
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
Checking for docker...   OK
Checking for docker-compose...   OK
Starting WebODM...

Using the following environment:
================================
Host: localhost
Port: 8000
Media directory: appmedia
SSL: NO
SSL key: 
SSL certificate: 
SSL insecure port redirect: 80
Celery Broker: redis://broker
Default Nodes: 1
================================
Make sure to issue a ./webodm.sh down if you decide to change the environment.

docker-compose -f docker-compose.yml -f docker-compose.nodeodm.gpu.intel.yml up --scale node-odm=1
Creating network "webodm_default" with the default driver
Creating volume "webodm_dbdata" with default driver
Creating volume "webodm_appmedia" with default driver
Pulling broker (redis:)...
latest: Pulling from library/redis
a2abf6c4d29d: Pull complete
c7a4e4382001: Pull complete
4044b9ba67c9: Pull complete
c8388a79482f: Pull complete
413c8bb60be2: Pull complete
1abfd3011519: Pull complete
Digest: sha256:db485f2e245b5b3329fdc7eff4eb00f913e09d8feb9ca720788059fdc2ed8339
Status: Downloaded newer image for redis:latest
Pulling node-odm (opendronemap/nodeodm:gpu.intel)...

this is my docker image which pull nodeodm:gpu.intel instead nodeodm:gpu.nvidia
docker image ls

docker image ls
REPOSITORY                    TAG         IMAGE ID       CREATED         SIZE
redis                         latest      7614ae9453d1   3 weeks ago     113MB
opendronemap/webodm_webapp    1.9.11      265dccea7d29   2 months ago    1.6GB
opendronemap/nodeodm          gpu.intel   83ea41c5090c   2 months ago    4.53GB
opendronemap/webodm_db        latest      e40c0f274bba   4 months ago    695MB

Nvidia was detected with nvidia-docker-image:
docker run --rm -it --gpus all nvidia/cuda:11.0-base bash -c "ldconfig;nvidia-smi"

my computer spec :
Intel core i5-8250U @1,6GHz
16 GB RAM DDR4
SSD Samsung 870 EVO
Integrated Intel UHD 620
Nvidia MX150 with 2 GB VRAM
MXLinux 19.4 (based on Debian 10/Buster)

Thank you for your attention :slight_smile:

1 Like

Welcome!

Sorry for the trouble.

Which driver are you using in MXLinux? Noveau, or the proprietary upstream NVIDIA driver?

I believe you’ll need to use the proprietary driver.

Hello, I don’t know which Nvidia driver that I use. Please tell me how to check it.

I installed CUDA 10.2 from this tutorial : CUDA Toolkit 10.2 Download | NVIDIA Developer

I installed nvidia-container-toolkit by this way :

distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
   && curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
   && curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list 
sudo apt-get update
sudo apt-get install -y nvidia-docker2
sudo service docker restart

Why I am using CUDA 10.2 instead of newest one? because I use PyTorch 1.8 and Tensorflow 2.3 which are supported by CUDA 10.2

1 Like

Check here:

If you have CUDA pinned at a back level like that, I’m not sure things will work properly, unfortunately.

Sorry for little bit out of topic. It seems MXlinux has Nvidia driver by Default.

First, I downloaded Nvidia-linux-x86_64-470.94.run, then I tried to

cd my_directory
sudo sh NVIDIA-Linux-x86_64-470.94.run

the result is

The NVIDIA driver appears to have been installed previously using a different installer.    
 To prevent potential conflicts, it is recommended either to update the existing             
 installation using the same mechanism by which it was originally installed, or to           
 uninstall the existing installation before installing this driver.                          
                                                                                             
 Please review the message provided by the maintainer of this alternate installation         
 method and decide how to proceed:

Then, I want to prove that by:

> sudo apt-get install nvidia-driver
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nvidia-driver is already the newest version (470.82.01-1).
0 upgraded, 0 newly installed, 0 to remove and 180 not upgraded.

What should I do?

Can you ensure you have these packages as well?:

Why pulling intel GPU image is mystery for me also. :blush:
I Have NVIDIA GPU with all nessecery
drivers , cuda toolkit, nvidia-container-toolkit runtime etc.
This environment working as expected with my GPU image build or pulled directly from docker-hub (opendronemap/nodeodm:gpu) attached manually to webodm

But when I issue :

cd WebODM
./webODM.sh start --gpu

docker always start to pulling intel image :confused:

2 Likes

i’m sure that I have installed nvidia-container-toolkit, nvidia-driver, and upgraded CUDA 10.2 to 11.4.

I just run this command

> ls -l /usr/local | grep cuda
lrwxrwxrwx  1 root root   22 Jan 13 22:06 cuda -> /etc/alternatives/cuda
lrwxrwxrwx  1 root root   25 Jan 13 22:06 cuda-11 -> /etc/alternatives/cuda-11
drwxr-xr-x 16 root root 4096 Jan 13 22:06 cuda-11.4

checking nvidia-driver version with MX tools quick info :

Graphics:  Device-1: Intel UHD Graphics 620 vendor: Acer Incorporated ALI driver: i915 
           v: kernel bus ID: 00:02.0 chip ID: 8086:5917 
           Device-2: NVIDIA GP108M [GeForce MX150] vendor: Acer Incorporated ALI 
           driver: nvidia v: 470.82.01 bus ID: 01:00.0 chip ID: 10de:1d10 
           Display: x11 server: X.Org 1.20.10 driver: intel compositor: kwin_x11 
           resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.3.4 
           direct render: Yes 

It also success run docker with
docker run --rm -it --gpus all nvidia/cuda:11.1-base bash -c "ldconfig;nvidia-smi"

Now, I will try brute way with modification at
docker-compose.nodeodm.gpu.intel

so, it pull image from opendronemap/nodeodm:gpu instead opendronemap/nodeodm:gpu.intel

version: '2.1'
services:
  webapp:
    depends_on:
      - node-odm
    environment:
      - WO_DEFAULT_NODES
  node-odm:
    environment:
      - RENDER_GROUP_ID
    image: opendronemap/nodeodm:gpu
    devices:
      - "/dev/dri"
    ports:
      - "3000"
    restart: unless-stopped
    oom_score_adj: 500

Hopefully it will success. But how to ensure that Docker WebODM using Nvidia? What is the indicator or syntax to see ODM is using Nvidia instead Intel?

I’m not sure at the moment… I think mixed-GPU deployments might be something without great coverage thus far.

1 Like

Because this my previous way was failed, so I’m trying this way.
changing ./webodm.sh

From:

lspci | grep 'VGA.*NVIDIA'
		if [ "${?}" -eq 0 ]; then
			export GPU_NVIDIA=true
			set -e
			return
		fi

To:

lspci | grep 'NVIDIA'
		if [ "${?}" -eq 0 ]; then
			export GPU_NVIDIA=true
			set -e
			return
		fi

IT SEEMS SUCCESS :smiley:

>>> ./webodm.sh start --gpu
01:00.0 3D controller: NVIDIA Corporation GP108M [GeForce MX150] (rev a1)
Checking for docker...   OK
Checking for docker-compose...   OK
Starting WebODM...

Using the following environment:
================================
Host: localhost
Port: 8000
Media directory: appmedia
SSL: NO
SSL key: 
SSL certificate: 
SSL insecure port redirect: 80
Celery Broker: redis://broker
Default Nodes: 1
================================
Make sure to issue a ./webodm.sh down if you decide to change the environment.

docker-compose -f docker-compose.yml -f docker-compose.nodeodm.gpu.nvidia.yml up --scale node-odm=1
Pulling node-odm (opendronemap/nodeodm:gpu)...
1 Like

Do you feel confident with this fix?

Would you like to open a pull request to submit it upstream to us?

Thanks for testing!

1 Like

I think so, So far, I did simple benchmark by running this sample dataset

Without GPU, it ran about 17 minutes.
With GPU, it ran about 13 minutes.

Without GPU, it said [INFO] nvidia-smi not found in PATH, using CPU
With GPU, it said [INFO] Using GPU for extracting SIFT features

Hopefully it also work perfectly on another computer. I’m afraid it success in my computer but not for other :frowning:

2 Likes