jetson-inference icon indicating copy to clipboard operation
jetson-inference copied to clipboard

Skipping cmake interactive pop-ups (automated script)

Open firststep-dev opened this issue 2 years ago • 8 comments

Is there a way to run cmake ../ step (as part of an automated script), automatically skipping these 2 pop-ups?

I am running the following commands:

rm -rf build
mkdir build
cd build
cmake ../
make -j$(nproc)
sudo make install

Step 1: Quit

image

Step 2: Skip

image

firststep-dev avatar Feb 24 '22 05:02 firststep-dev

Hi @firststep-dev, yes there is, with -DBUILD_INTERACTIVE=off

dusty-nv avatar Feb 24 '22 18:02 dusty-nv

Thanks @dusty-nv

firststep-dev avatar Feb 25 '22 04:02 firststep-dev

@dusty-nv setting this -DBUILD_INTERACTIVE=off flag by default this installs "default models".

Reading package lists...
[jetson-inference]  BUILD_INTERACTVE=off
[jetson-inference]  Downloading default models...
[jetson-inference]  Downloading GoogleNet...
bvlc_googlenet.caff   3%[                    ]   2,00M   122KB/s    eta 5m 34s

How can I disable / skip these 2 pop-ups (i.e. edit the default lists) for non-interactive build mode?

firststep-dev avatar Feb 27 '22 16:02 firststep-dev

@dusty-nv - just a kind followup.

How can I run -DBUILD_INTERACTIVE=off while disabling ALL default model download?

Is there a config file for default model downloads?

leenremm avatar Apr 27 '22 10:04 leenremm

I see that the default list of models is defined in a SH script in build/download-models.sh:

if [[ "$BUILD_INTERACTIVE" != "YES" ]]; then

        echo "$LOG Downloading default models..."

        download_googlenet
        download_resnet18

        download_ssd_mobilenet_v2
        download_pednet
        download_facenet
        download_detectnet_coco_dog

        download_fcn_resnet18_cityscapes_512x256
        download_fcn_resnet18_cityscapes_1024x512
        download_fcn_resnet18_deepscene_576x320
        download_fcn_resnet18_mhp_512x320
        download_fcn_resnet18_pascal_voc_320x320
        download_fcn_resnet18_sun_rgbd_512x400

        exit_message 0
fi

leenremm avatar Apr 27 '22 10:04 leenremm

I see that this file is created in the ./build directory during cmake, where it is copied from tools/download-models.sh

file(COPY "tools/download-models.sh" DESTINATION ${PROJECT_BINARY_DIR})

So I have edited the file: tools/download-models.sh, from:

if [[ "$BUILD_INTERACTIVE" != "YES" ]]; then

	echo "$LOG Downloading default models..."

	download_googlenet
	download_resnet18

	download_ssd_mobilenet_v2
	download_pednet
	download_facenet
	download_detectnet_coco_dog

	download_fcn_resnet18_cityscapes_512x256
	download_fcn_resnet18_cityscapes_1024x512
	download_fcn_resnet18_deepscene_576x320
	download_fcn_resnet18_mhp_512x320
	download_fcn_resnet18_pascal_voc_320x320
	download_fcn_resnet18_sun_rgbd_512x400

	exit_message 0
fi

to the following:

if [[ "$BUILD_INTERACTIVE" != "YES" ]]; then

	echo "$LOG Downloading default models..."
        exit_message 0

fi

leenremm avatar Apr 27 '22 10:04 leenremm

Alternatively you can remove the download step in the pre-build script: CMakePreBuild.sh:46.

ligaz avatar Apr 27 '22 12:04 ligaz

Hi @ligaz, very good, glad you got it figured out - I would have suggested either of your patches.

dusty-nv avatar Apr 27 '22 17:04 dusty-nv