add missing install dependencies

- force darknet to try install every run instead of check for existence
merge-requests/19/head
Moe 2018-08-05 20:24:50 -07:00
parent 702f6b3018
commit 16961d40e4
1 changed files with 45 additions and 22 deletions

View File

@ -10,6 +10,7 @@ else
fi
if ! [ -x "$(command -v gcc-6)" ]; then
echo "Installing gcc-6 and g++-6"
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get install gcc-6 g++-6 -y && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6
else
echo "gcc-6 and g++-6 found"
@ -42,31 +43,53 @@ else
echo "OpenCV found : $(opencv_version)"
fi
echo "-----------------------------------"
echo "Smoking pips"
pip3 install flask
pip3 install numpy
export PATH=/usr/local/cuda/bin:$PATH
pip3 install lxml
pip3 install numpy
pip3 install cython
echo "Installing Darknet"
cd /opt
git clone https://github.com/pjreddie/darknet.git darknet
cd darknet
make
cd ..
echo "Installing YOLO3-4-Py"
echo "Learn More about this wrapper here : https://github.com/madhawav/YOLO3-4-Py"
git clone https://github.com/madhawav/YOLO3-4-Py.git YOLO3-4-Py
cd YOLO3-4-Py
export GPU=1
export OPENCV=1
if [ ! -x "$(command -v darknet)" ]; then
if [ ! -d "/opt/darknet" ]; then
export PATH=/usr/local/cuda/bin:$PATH
pip3 install lxml
pip3 install numpy
pip3 install cython
echo "Installing Darknet"
cd /opt
git clone https://github.com/pjreddie/darknet.git darknet
cd darknet
make
cd ..
git clone https://github.com/madhawav/YOLO3-4-Py.git YOLO3-4-Py
cd YOLO3-4-Py
export GPU=1
export OPENCV=1
pip3 install .
apt remove libpython-all-dev python-all python-all-dev python-asn1crypto python-cffi-backend python-crypto python-cryptography python-dbus python-enum34 python-gi python-idna python-ipaddress python-keyring python-keyrings.alt python-pkg-resources python-secretstorage python-setuptools python-six python-wheel python-xdg -y
echo "Done Installing Darknet"
fi
export PATH=/opt/darknet:$PATH
pip3 install .
apt remove libpython-all-dev python-all python-all-dev python-asn1crypto python-cffi-backend python-crypto python-cryptography python-dbus python-enum34 python-gi python-idna python-ipaddress python-keyring python-keyrings.alt python-pkg-resources python-secretstorage python-setuptools python-six python-wheel python-xdg -y
echo "Done Installing Darknet"
export PATH=/opt/darknet:$PATH
echo "-----------------------------------"
if [ ! -d "weights" ]; then
echo "Downloading yolov3 weights"
mkdir weights
wget -O weights/yolov3.weights https://pjreddie.com/media/files/yolov3.weights
else
echo "Darknet found"
echo "yolov3 weights found"
fi
echo "-----------------------------------"
if [ ! -d "cfg" ]; then
echo "Downloading yolov3 cfg"
mkdir cfg
wget -O cfg/coco.data https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/coco.data
wget -O cfg/yolov3.cfg https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov3.cfg
else
echo "yolov3 cfg found"
fi
echo "-----------------------------------"
if [ ! -d "data" ]; then
echo "Downloading yolov3 data"
mkdir data
wget -O data/coco.names https://raw.githubusercontent.com/pjreddie/darknet/master/data/coco.names
else
echo "yolov3 data found"
fi
echo "-----------------------------------"
if [ ! -e "./conf.json" ]; then