...
Deploy NodeAuthServer
- deploy files
$ sudo mkdir /usr/libexec/NodeAuth
$ sudo cp xxx/NodeAuthServer /usr/libexec/NodeAuth
$ sudo chmod +x /usr/libexec/NodeAuth/NodeAuthServer
- add service for systemctl
$ sudo vim /etc/systemd/system/NodeAuthServer.service
[Unit]
Description=Node Auth Server[Service]
WorkingDirectory=/usr/libexec/NodeAuth
ExecStart=/usr/libexec/NodeAuth/NodeAuthServer[Install]
WantedBy=multi-user.target - start parsec servive
$ sudo systemctl enable NodeAuthServer.service
$ sudo systemctl start NodeAuthServer.service
- deploy files
Deploy k3s Server
- install and get token
$ curl -sfL https://get.k3s.io | sh -s - --docker
$ sudo cat /var/lib/rancher/k3s/server/node-token
K10f3a81f8be38c4f230e45d330b153a6266a665d3310764d0d09075c2d4a40aa5b::server:a3abba7155f2f7b4684dbc548724ed22
- install and get token
Deploy EdgeFaas
- run by docker
$ sudo docker run --name edgefaas --restart=always -d -p8888:8080 registry.gitlab.com/arm-research/smarter/edgefaas/edgefaas:v1-1-0
- install demo apis
$ curl 192.168.0.118:8888/mgmt -d "http://192.168.0.104:8080/sysinfo.py"
$ curl 192.168.0.118:8888/mgmt -d "http://192.168.0.104:8080/camera.py"
$ curl 192.168.0.118:8888/mgmt -d "http://192.168.0.104:8080/image.py"
Note: 192.168.0.118 is EdgeFaas device, 192.168.0.104 is PC.
- run by docker
Deploy Demo App on Nvidia Nano
Deploy Parsec Server
prepared files directory structure
parsec-server-aarch64/
parsec
config.toml
parsec.service
add system user parsec (NEED login by root)
$ sudo useradd -m parsec
$ sudo passwd parsec
$ sudo usermod -s /bin/bash parsec
$ sudo loginctl enable-linger parsec
$ sudo groupadd parsec-clients
create necessary directorys (NEED login by root)
$ sudo mkdir /var/lib/parsec
$ sudo chown parsec:parsec /var/lib/parsec
$ sudo chmod 700 /var/lib/parsec
$ sudo mkdir /etc/parsec
$ sudo chown parsec:parsec /etc/parsec
$ sudo chmod 700 /etc/parsec
$ sudo mkdir /usr/libexec/parsec
$ sudo chown parsec:parsec /usr/libexec/parsec
$ sudo chmod 700 /usr/libexec/parsec
$ sudo mkdir /home/parsec/run/
$ sudo chown parsec:parsec-clients /home/parsec/run/
$ sudo chmod 750 /home/parsec/run/
deploy files (NEED login by parsec)
$ cp xxx/parsec-server-aarch64/parsec /usr/libexec/parsec
$ chmod +x /usr/libexec/parsec/parsec
$ cp xxx/parsec-server-aarch64/config.toml /etc/parsec/config.toml
$ mkdir -p ~/.config/systemd/user
$ cp xxx/parsec-server-aarch64/parsec.service ~/.config/systemd/user
start parsec servive (NEED login by parsec)
$ systemctl --user enable parsec
$ systemctl --user start parsec
Deploy Parsec client
- import docker image
$ sudo docker load < parsec-client-v1.0-docker-aarch64.tar
$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> d396f7adeed3 2 months ago 16.9MB
$ sudo docker tag d396f7adeed3 parsec-client:v1.0 - run image
$ sudo docker run --restart=always -d -p8300:8300 -v /home/parsec/run:/run/parsec parsec-client:v1.0
$ curl -v -d '{"Name": "GoClient"}' 127.0.0.1:8300/client
...
HTTP/1.1 200 OK
... - import public key
$ curl -v -d '{"Name": "GoClient", "KeyName": "MyPubKey", "Message":"ssh-rsa MIIBCgKCAQEAui7zi+ehpbtqa+haTF2S7dB01QKf2zpIpy//58x9j4L1ZR44h7ftdymJlg3c07VBRVEx5BUIuaXPZ2g4Yq5Un21LK9GQoPvisIU53ePQN5anY4sO+NhqPOnaobkX02Pflp1m5EYjyCgVY62of/DXaPyr91xFeeyvRJFgfyPA+xk7VCsbjtNEL118IhJLmMVqNq/OgDDTvCN93hgJD5D/nRvXhe4CVR6ZYvBLF1E7blwwcq3EcmtYO+u3l0mPQSm9OR6YLhqxTcw29G/MBP+1X6yokALE/0Ykt0FxIOIQDkdukKtK50p38kzluQ9iHIOhG2QWhTpqwa7boQyeXcLiLQIDAQAB GoClient_MyEncKey"}' 127.0.0.1:8300/key
- import docker image
Deploy NodeAuthAgent
- deploy files
$ sudo mkdir /usr/libexec/NodeAuth
$ sudo cp xxx/NodeAuthAgent /usr/libexec/NodeAuth
$ sudo chmod +x /usr/libexec/NodeAuth/NodeAuthAgent - config systemctl service
$ sudo vim /etc/systemd/system/NodeAuthAgent.service
[Unit]
Description=Node Auth Agent
[Service]
WorkingDirectory=/usr/libexec/NodeAuth
ExecStart=/usr/libexec/NodeAuth/NodeAuthAgent
[Install]
WantedBy=multi-user.target - start service
$ sudo systemctl enable NodeAuthAgent.service
$ sudo systemctl start NodeAuthAgent.service
- deploy files
Deploy k3s agent
Deploy Triton Server
- Deploy Triton client
- install with k3s server token
$ curl -sfL https://get.k3s.io | K3S_URL=https://192.168.0.116:6443 K3S_TOKEN=K10f3a81f8be38c4f230e45d330b153a6266a665d3310764d0d09075c2d4a40aa5b::server:a3abba7155f2f7b4684dbc548724ed22 sh -s - --docker
- install with k3s server token
Deploy Triton Server
- get JetPack
$ wget https://github.com/triton-inference-server/server/releases/download/v2.17.0/tritonserver2.17.0-jetpack4.6.tgz
$ tar zxvf tritonserver2.17.0-jetpack4.6.tgz - Installation dependent environment
$ sudo apt-get update && \
sudo apt-get install -y --no-install-recommends \
software-properties-common \
autoconf \
automake \
build-essential \
cmake \
git \
libb64-dev \
libre2-dev \
libssl-dev \
libtool \
libboost-dev \
libcurl4-openssl-dev \
libopenblas-dev \
rapidjson-dev \
patchelf \
zlib1g-dev
$ sudo apt remove cmake
$ wget https://cmake.org/files/v3.21/cmake-3.21.0.tar.gz
$ tar -xf cmake-3.21.0.tar.gz
$ cd cmake-3.21.0 && ./configure && sudo make install
$ sudo apt-get install -y --no-install-recommends \
curl \
pkg-config \
python3 \
python3-pip \
python3-dev
$ sudo pip3 install --upgrade wheel setuptools cython
$ sudo pip3 install --upgrade grpcio-tools numpy==1.19.4 future attrdict - get Triton Model
$ git clone https://github.com/triton-inference-server/server
$ git checkout r21.12
$ cd docs/examples
$ ./fetch_models.sh - test Triton server
$ cd tritonserver2.17.0
$ bin/tritonserver --model-repository=../model_repository --backend-directory=./backends --backend-config=tensorflow,version=2
$ curl -v localhost:8000/v2/health/ready - creata systemctl service
$ sudo useradd -m triton
$ sudo passwd triton
$ sudo usermod -s /bin/bash triton
$ sudo loginctl enable-linger triton
$ cp -R /xxx/tritonserver2.17.0 ./
$ cp -R /home/u0u0/Documents/model_repository ./
$ mkdir -p ~/.config/systemd/user
$ vim ~/.config/systemd/user/triton.service
[Unit]
Description=Triton Server
[Service]
WorkingDirectory=/home/triton
ExecStart=/home/triton/tritonserver2.17.0/bin/tritonserver --model-repository=/home/triton/model_repository --backend-directory=/home/triton/tritonserver2.17.0/backends --backend-config=tensorflow,version=2
[Install]
WantedBy=default.target - start service
$ systemctl --user enable triton
$ systemctl --user start triton
- get JetPack
Deploy Triton client
- import docker image
$ sudo docker load < triton-client-v1.0-docker-aarch64.tar
$ sudo docker images
$ sudo docker tag a39dfgf7adeed3 triton-client:v1.0 - run image
$ sudo docker run --restart=always --add-host=host.docker.internal:host-gateway -d -p8302:8302 triton-client:v1.0
- import docker image
Maintenance
Blue Print Package Maintenance
...