From 3d0066a45b062df6638f73a244e2615518ad124e Mon Sep 17 00:00:00 2001 From: voilalex Date: Sun, 20 Oct 2019 01:48:56 +0300 Subject: [PATCH] Add installation script --- README.md | 8 ++++++++ install_and_run.sh | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 install_and_run.sh diff --git a/README.md b/README.md index 4985335..6984a14 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,14 @@ Note: In Tensorflow 1.5 it is a known issue of TensorBoard not launching properl python -m tensorboard.main --logdir=mnist_TB_logs ``` +### Installation and running (with bash) + +To install all the dependencies and execute all supposed +routines run the following: +``` +sh install_and_run.sh +``` + ## Built With * [TensorFlow](https://www.tensorflow.org/) - Framework version 1.2.1 used diff --git a/install_and_run.sh b/install_and_run.sh new file mode 100644 index 0000000..35f2f00 --- /dev/null +++ b/install_and_run.sh @@ -0,0 +1,25 @@ +# Install modules for virtual environments +# if they aren't installed now + +command -v mkvirtualenv >/dev/null 2>&1 || { +sudo pip3 install virtualenv virtualenvwrapper +echo'export WORKON_HOME=$HOME/.virtualenvs +export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 +source /usr/local/bin/virtualenvwrapper.sh' >> ~/.bashrc +} + +# Make virtual environment +# with required version of TF + +mkvirtualenv tf-1 -p python3 +sudo pip install tensorflow==1.15 + +# Run main scripts + +python CNN_TB_MNIST_Example.py +tensorboard --logdir mnist_TB_logs + +# deactivate the virtual environments + +deactivate +