diff --git a/README.md b/README.md index 694f3ae..f2cfdc6 100644 --- a/README.md +++ b/README.md @@ -38,13 +38,13 @@ Setup 3. Install TensorFlow 1.7+ (with TensorRT support). Download the [pre-built pip wheel](https://devtalk.nvidia.com/default/topic/1031300/jetson-tx2/tensorflow-1-8-wheel-with-jetpack-3-2-/) and install using pip. ``` - sudo pip install tensorflow-1.8.0-cp27-cp27mu-linux_aarch64.whl + pip install tensorflow-1.8.0-cp27-cp27mu-linux_aarch64.whl --user ``` or if you're using Python 3. ``` - sudo pip3 install tensorflow-1.8.0-cp35-cp35m-linux_aarch64.whl + pip3 install tensorflow-1.8.0-cp35-cp35m-linux_aarch64.whl --user ``` diff --git a/install.sh b/install.sh index ed22ef9..c569148 100755 --- a/install.sh +++ b/install.sh @@ -1,8 +1,7 @@ #!/bin/bash -ROOT_DIR=$PWD -THIRD_PARTY_DIR=$ROOT_DIR/third_party -MODELS_DIR=$THIRD_PARTY_DIR/models +INSTALL_PROTOC=$PWD/scripts/install_protoc.sh +MODELS_DIR=$PWD/third_party/models PYTHON=python @@ -13,23 +12,27 @@ fi echo $PYTHON # install protoc -( -source scripts/install_protoc.sh -) +echo "Downloading protoc" +source $INSTALL_PROTOC +PROTOC=$PWD/data/protoc/bin/protoc # install tensorflow models -( git submodule update --init -cd $MODELS_DIR -cd research -protoc object_detection/protos/*.proto --python_out=. -sudo $PYTHON setup.py install -cd slim -sudo $PYTHON setup.py install -cd $ROOT_DIR -) - -# install this project -( -sudo $PYTHON setup.py install -) + +pushd $MODELS_DIR/research +echo $PWD +echo "Installing object detection library" +echo $PROTOC +$PROTOC object_detection/protos/*.proto --python_out=. +$PYTHON setup.py install --user +popd + +pushd $MODELS_DIR/research/slim +echo $PWD +echo "Installing slim library" +$PYTHON setup.py install --user +popd + +echo "Installing tf_trt_models" +echo $PWD +$PYTHON setup.py install --user diff --git a/scripts/install_protoc.sh b/scripts/install_protoc.sh index 1668140..560e06d 100644 --- a/scripts/install_protoc.sh +++ b/scripts/install_protoc.sh @@ -1,9 +1,10 @@ #!/bin/bash BASE_URL="https://github.com/google/protobuf/releases/download/v3.5.1/" +PROTOC_DIR=data/protoc -mkdir -p data/protoc -cd data/protoc +mkdir -p $PROTOC_DIR +pushd $PROTOC_DIR ARCH=$(uname -m) if [ "$ARCH" == "aarch64" ] ; then filename="protoc-3.5.1-linux-aarch_64.zip" @@ -15,7 +16,4 @@ else fi wget --no-check-certificate ${BASE_URL}${filename} unzip ${filename} -sudo mv bin/protoc /usr/bin/protoc -sudo mv include/google /usr/local/include/google -cd ../.. -rm -rf data/protoc +popd