【tensorflow】tensorflow-model-server安装

直接在ubuntu上使用apt-get进行安装

1、环境说明

①、操作系统:ubuntu
②、网络要求:需要能够科学上网

2、安装依赖

sudo apt-get install -y python3 build-essential curl libcurl3-dev git libfreetype6-dev libzmq3-dev pkg-config python3-dev python3-numpy python3-pip software-properties-common swig zip zlib1g-dev

3、配置python环境

sudo ln -s /usr/bin/python3 /usr/bin/python
sudo ln -s /usr/bin/pip3 /usr/bin/pip

ln: 无法创建符号链接‘/usr/bin/python3‘:文件已存在,解决方法

4、安装tensorflow-serving-api

sudo pip install tensorflow-serving-api

5、配置tensorflow-model-server仓库

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 -

6、安装并更新tensorflow-model-server

sudo apt-get update && sudo apt-get install tensorflow-model-server
sudo apt-get upgrade tensorflow-model-server

7、直接执行tensorflow_model_server命令测试是否安装成功

tensorflow_model_server

安装完成,如下所示!
(报错是因为还未连接)
在这里插入图片描述

参考文章
tensorflow-model-server安装
TensorFlow Serving安装

你可能感兴趣的:(tensorflow,tensorflow,ubuntu,人工智能)