Skip to content

Commit

Permalink
Merge pull request NVIDIA-AI-IOT#18 from NVIDIA-Jetson/local_installa…
Browse files Browse the repository at this point in the history
…tion_script

removed sudo from installation scripts
  • Loading branch information
John Welsh authored Sep 26, 2018
2 parents 3cffe63 + 6d5ea1d commit e5152c0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 28 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


Expand Down
43 changes: 23 additions & 20 deletions install.sh
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
10 changes: 4 additions & 6 deletions scripts/install_protoc.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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

0 comments on commit e5152c0

Please sign in to comment.