MatteoCappe / Matteo_thesis_workbook

0 stars 0 forks source link

Docker #23

Open MatteoCappe opened 1 week ago

MatteoCappe commented 1 week ago

Check out the Dockerfile to run the environment for feature extraction and matching here.

Build the docker with the following command:

docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t cappe00/6dof_env:latest .

And then push onto Dockerhub:

docker push cappe00/6dof_env:latest
Nvidia drivers on the alienware ``` icub@IITICUBLAP211:~$ nvidia-smi Wed Nov 13 11:11:36 2024 +---------------------------------------------------------------------------------------+ | NVIDIA-SMI 535.183.01 Driver Version: 535.183.01 CUDA Version: 12.2 | |-----------------------------------------+----------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+======================+======================| | 0 NVIDIA GeForce RTX 2070 ... Off | 00000000:01:00.0 On | N/A | | N/A 41C P8 10W / 115W | 339MiB / 8192MiB | 3% Default | | | | N/A | +-----------------------------------------+----------------------+----------------------+ +---------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=======================================================================================| | 0 N/A N/A 1468 G /usr/lib/xorg/Xorg 35MiB | | 0 N/A N/A 2122 G /usr/lib/xorg/Xorg 98MiB | | 0 N/A N/A 2254 G /usr/bin/gnome-shell 145MiB | | 0 N/A N/A 5139 G ...seed-version=20241111-180219.336000 48MiB | +---------------------------------------------------------------------------------------+ ```

When running the docker image as a container use the following command in order to be able to read and modify preexisting folders and files on the computer:

docker run -it -v ~/Desktop/matteo_6dof_workspace/:/data --rm --gpus all cappe00/6dof_env nvidia-smi /bin/bash

sudo docker run --rm --gpus all nvidia/cuda nvidia-smi sudo docker run -it --rm --gpus all ubuntu nvidia-smi

Another consideration to be made is that the docker container doesn't have a display connected to it (?), so when running the experiments on SuperPoint or SuperGlue remember to disable the visualization as follows:

./demo_superpoint.py ../../data/SCARF_tests/SCARF_tuning/alpha0_7-C0_5.mp4 --no_display --write --write_dir ../../data/SCARF_tests/SP/alpha0_7-C0_5/
./demo_superglue.py --input ../../data/alpha0_7-C0_5.mp4 --output_dir ../../data/SG --no_display
Otherwise the following error will be visualized ``` qt.qpa.xcb: could not connect to display :0.0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/lib/python3.7/dist-packages/cv2/qt/plugins" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: xcb. ```