Skip to content

Instantly share code, notes, and snippets.

@corenel
Last active December 4, 2017 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corenel/168882775185be6d8712e716880df152 to your computer and use it in GitHub Desktop.
Save corenel/168882775185be6d8712e716880df152 to your computer and use it in GitHub Desktop.
Install MXNet on TX1 with ROS-OpenCV 3.2.0

See this tutorial on TX2.

Tips:

  1. Modify Makefile:
  • specify path of include and library of ros-opencv
export PKG_CONFIG_PATH=/opt/ros/kinetic/lib/pkgconfig:$PKG_CONFIG_PATH
diff --git a/Makefile b/Makefile
index 72dd26e..33b56d0 100644
--- a/Makefile
+++ b/Makefile
@@ -94,12 +94,21 @@ endif

 # setup opencv
 ifeq ($(USE_OPENCV), 1)
-       CFLAGS += -DMXNET_USE_OPENCV=1 $(shell pkg-config --cflags opencv)
-       LDFLAGS += $(filter-out -lopencv_ts, $(shell pkg-config --libs opencv))
-       BIN += bin/im2rec
+       CFLAGS += -DMXNET_USE_OPENCV=1 `pkg-config --cflags opencv-3.2.0-dev`
+       LDFLAGS += `pkg-config --libs opencv-3.2.0-dev`
+    BIN += bin/im2rec
 endif

 ifeq ($(USE_OPENMP), 1)
        ifneq ($(UNAME_S), Darwin)
  • specify altas path:
@@ -136,6 +145,10 @@ ifeq ($(USE_OPERATOR_TUNING), 1)
 endif

 # verify existence of separate lapack library when using blas/openblas/atlas
+
+ifeq ($(USE_BLAS), 1)
+       LDFLAGS +=  -L/usr/lib/atlas-base
+endif
 # switch off lapack support in case it can't be found
 # issue covered with this
 #   -  for Ubuntu 14.04 or lower, lapack is not automatically installed with openblas
  1. Modify mshadow/make/mshadow.mk, disable SSE
diff --git a/make/mshadow.mk b/make/mshadow.mk
index 5893b5a..ad8d6cc 100644
--- a/make/mshadow.mk
+++ b/make/mshadow.mk
@@ -22,7 +22,7 @@ else
 endif

 ifndef USE_SSE
-       USE_SSE=1
+       USE_SSE=0
 endif

 ifeq ($(USE_SSE), 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment