Launch DensePose on Baobab

A user wanted to use DensePose on Baobab. Two possibilities here: install ith through Conda or use a Docker image, same concept as this post.

Let’s first convert the Docker image to Singularity:

[testsagon1@login2 test]$ ml GCCcore/8.2.0 Singularity/3.4.0-Go-1.12
[testsagon1@login2 test]$ PATH=$PATH:/sbin singularity build densepose.simg docker://garyfeng/densepose:latest

Then use this script to launch a test:

#!/bin/sh

#SBATCH --partition=shared-gpu-EL7
#SBATCH --gres=gpu:1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --time=10:00

module load GCCcore/8.2.0 Singularity/3.4.0-Go-1.12

OPENPOSE_SIMG=densepose.simg

CMD="python2 /densepose/detectron/tests/test_batch_permutation_op.py"

LD_LIBRARY_PATH=/usr/local/caffe2_build/lib:$LD_LIBRARY_PATH

srun singularity exec --nv --pwd=/densepose $OPENPOSE_SIMG $CMD

Launch it:

[testsagon1@login2 test]$ sbatch run.sh 
Submitted batch job 26667350
[testsagon1@login2 test]$ cat slurm-26667350.out
No handlers could be found for logger "caffe2.python.net_drawer"
E0121 13:47:50.183898    14 init_intrinsics_check.cc:54] CPU feature avx is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
E0121 13:47:50.183960    14 init_intrinsics_check.cc:54] CPU feature avx2 is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
E0121 13:47:50.183987    14 init_intrinsics_check.cc:54] CPU feature fma is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
..
----------------------------------------------------------------------
Ran 2 tests in 1.382s

OK
net_drawer will not run correctly. Please install the correct dependencies.
Found Detectron ops lib: /usr/local/caffe2_build/lib/libcaffe2_detectron_ops_gpu.so