Installing version 1.15 of tensorflow-serving-api to Centos 8 - tensorflow

I am trying to install Tensorflow-serving to my Centos 8 machine. Installing with Docker image is not an option for Centos. So I try to install with pip. These are the commands for installing tensorflow-model-server:
pip3 install tensorflow-serving-api==1.15
echo "deb [arch=amd64] http://storage.googleapis.com/tensorflow-serving-apt stable tensorflow-model-server tensorflow-model-server-universal" | sudo tee /etc/apt/sources.list.d/tensorflow-serving.list
curl https://storage.googleapis.com/tensorflow-serving-apt/tensorflow-serving.release.pub.gpg | sudo apt-key add -
sudo apt-get update && sudo apt-get install tensorflow-model-server
The problem is I need version 1.15.0 and I couldn't find how to modify links to install the 1.15 version. Any help for modifying links, ideas for installing "tensorflow/serving" to Centos 8 will be appreciated by me :)

I found the links:
wget 'http://storage.googleapis.com/tensorflow-serving-apt/pool/tensorflow-model-server-1.15.0/t/tensorflow-model-server/tensorflow-model-server_1.15.0_all.deb'
dpkg -i tensorflow-model-server_1.15.0_all.deb
pip3 install tensorflow-serving-api==1.15
With these commands, it works :)

Related

How to downgrade chrome to version 87.0.4280.88 on Ubuntu 20.04?

I tried to find the package for above said version for chrome from this link but i'm unable to find it. Where can i find the said package and what would be the steps to downgrade chrome on my Ubuntu 20.04 machine ?
First of all uninstall your current version of Chrome
$ sudo apt-get purge google-chrome-stable
$ mv ~/.config/google-chrome/ ~/.config/google-chrome.bak/
Then install the preferred version choosing from here and replacing the ${CHROME_VERSION} on the code below with the version you need (in this case 87.0.4280.88-1 )
wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb \
&& apt install -y /tmp/chrome.deb \
&& rm /tmp/chrome.deb

How can I install Tensorflow GPU with latest version of CUDA and cuDNN

Installing TensorFlow for object detection is annoying sometimes, especially when wired errors happen after starting one's own object detection project by finetuning pre-trained model.
How to install latest Tensorflow GPU support and latest CUDA/CUDNN without any error?
To install tensorflow-gpu object detection api on Ubuntu 16.04
upgrade system
sudo apt-get update
sudo apt-get upgrade
install basic packages
sudo apt-get install vim curl python-dev gnupg-curl python-tk git
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo -H python get-pip.py
install tensorflow-gpu (tensorflow version=1.14)
sudo -H pip install tensorflow-gpu
install CUDA (Final CUDA version = 10.1)
// Please turn off your secure boot from BIOS
sudo apt-get install gnupg-curl
// Here we install version 10.0 to avoid other issues. Later we can upgrade it to version 10.1
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_10.0.130-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
sudo apt install ./nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
sudo apt-get update
install cuDNN (cuDNN version = 7.6.3.30-1, compatible to CUDA 10.1)
sudo apt-get install --no-install-recommends cuda-10-0
// restart your computer here
nvidia-smi.
sudo apt-get install --no-install-recommends libcudnn7=7.6.3.30-1+cuda10.0 libcudnn7-dev=7.6.3.30-1+cuda10.0
sudo apt-get install -y --no-install-recommends libnvinfer5=5.1.5-1+cuda10.0 libnvinfer-dev=5.1.5-1+cuda10.0
sudo apt-get update
// this upgrade command will upgrade your CUDA to version 10.1
sudo apt-get upgrade
sudo apt-get autoremove
install Tensorflow object detection api
sudo -H pip install Cython
sudo -H pip install contextlib2
sudo -H pip install pillow
sudo -H pip install lxml
sudo -H pip install jupyter
sudo -H pip install matplotlib
mkdir tensorflow
cd tensorflow
git clone https://github.com/tensorflow/models
// install protocbuf version 3.0.0
wget -O protobuf.zip https://github.com/google/protobuf/releases/download/v3.0.0/protoc-3.0.0-linux-x86_64.zip
unzip protobuf.zip
sudo cp ./bin/protoc /bin/
sudo cp -r ./include/google /usr/local/include/
cd tensorflow/models/research
protoc object_detection/protos/*.proto --python_out=.
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
make
cp -r pycocotools <path_to_tensorflow>/models/research/
Export Environment
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.1/lib64
export PYTHONPATH=$PYTHONPATH:~/tensorflow/models/research:~/tensorflow/models/research/object_detection/slim
Other
If we install CUDA 10.1 it may have a compatibility issue that libxxxx.so.10.0 is not found when you start training your project.
To solve them:
a. sudo ln -s /usr/lib/x86_64-linux-gnu/libcublas.so.10.1 /usr/local/cuda-10.1/lib64/libcublas.so.10.0
b. sudo ln -s /usr/local/cuda-10.1/lib64/libcudart.so.10.1 /usr/local/cuda-10.1/lib64/libcudart.so.10.0
c. sudo ln -s /usr/local/cuda-10.1/lib64/libcufft.so.10 /usr/local/cuda-10.1/lib64/libcufft.so.10.0
d. sudo ln -s /usr/local/cuda-10.1/lib64/libcurand.so.10 /usr/local/cuda-10.1/lib64/libcurand.so.10.0
e. sudo ln -s /usr/local/cuda-10.1/lib64/libcusolver.so.10 /usr/local/cuda-10.1/lib64/libcusolver.so.10.0
f. sudo ln -s /usr/local/cuda-10.1/lib64/libcusparse.so.10 /usr/local/cuda-10.1/lib64/libcusparse.so.10.0
All Set

sudo: pecl7.2-sp: command not found

I need to install GeoIP on PHP 7.2 .
For this I am using following commands -
sudo apt-get -y install gcc make autoconf libc-dev pkg-config
sudo apt-get -y install libgeoip-dev
sudo pecl7.2-sp install geoip-beta
Top two commands are run successfully, But while running the third on I am getting following error -
sudo: pecl7.2-sp: command not found
Any suggestion, How can I install pecl on php 7.2 or any other way to install GeoIP on php 7.2.
I am on ubuntu 16:04 and the following got it working for me (more or less):
Run the following command:
sudo apt-get install php-pear php-dev
Now you can run the command pecl instead pecl7.2-sp - seems to work fine though:
sudo pecl install geoip-beta
Hope that helps.
I had to install imagick for php7.3 so I was getting same error using command like this
sudo pecl7.2-sp install imagick
What worked for me is running the command like this
pecl -d php_suffix=7.3 install -f imagick

Installing libapache2-mod-php7.1

I installed Apache 2.4.27 and PHP 7.1.7 from source, but I don't find a tip about how to install libapache2-mod-php7.1 or the required module.
How can I install libapache2-mod-php7.1 (or similar) to Apache 2 located under /user/local/apache2?
I have to install it on Debian 8.8 Jessie.
Basically it should be installed during installation of PHP:
sudo apt-get install php7.1
...
The following NEW packages will be installed:
libapache2-mod-php7.1 libssl1.0.2 php-common php7.1 php7.1-cli php7.1-common php7.1-json php7.1-opcache php7.1-readline
So first check if it is already installed:
dpkg -l | grep libapache2-mod-php7.1
ii libapache2-mod-php7.1 7.1.7.retag-1+0~20170711133844.5+jessie~1.gbp5284f4 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
In case it is not installed the following command should work fine:
sudo apt-get install libapache2-mod-php7.1
If it will fail check if it is available in repo:
apt-get update
apt-cache search libapache2-mod-php7.1
I used deb.sury.org for php 7.1:
apt-get install apt-transport-https ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ jessie main" > /etc/apt/sources.list.d/php.list
apt-get update

unable to install redis 2.7+ on ubuntu 12.04

I am new to redis. and I just followed cli to install redis sudo apt-get install redis.
but the install server version is 2.2.12 . If I want to update this version and I want to install redis 2.7 + then how can I do this thing, please help. I am working on ubuntu 12.04
You can install a Personal Package Archive to get the latest version. A popular one seems to be https://launchpad.net/~rwky/+archive/redis
edit: The one above is no longer maintained. Try https://launchpad.net/~chris-lea/+archive/ubuntu/redis-server instead.
sudo apt-get -y install python-software-properties
sudo add-apt-repository -y ppa:chris-lea/redis-server
sudo apt-get -y update
sudo apt-get -y install redis-server
These commands installed the latest version for me at the time of writing.
Ubuntu repositories have the 2.2 version of Redis as you discovered. If you want the latest version, you will have to download the sources from github and install it manually.
See "Installing Redis" section in the readme over here - https://github.com/antirez/redis
Try either
sudo apt-get install redis-server
or
http://laymansite.com/install-redis-in-ubuntu-12-04/