tflite_runtime get Illegal instruction on raspberry pi - linux

after installing tflite_runtime on raspberry pi using the following commands
echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install python3-tflite-runtime
and trying to import tflite .. I got "Illegal instruction"
Error screenshot

The prebuilt tflite_runtime package set from the above site does not cover armv6 architecture yet.
Alternatively, you can choose some other options.
(1) Install the TensorFlow pip package.
TensorFlow Lite features are a part of TensorFlow package and the prebuilt TensorFlow pip packages support armv6. See https://www.tensorflow.org/install/pip
(2) Build your own tflite_runtime through Bazel or CMake.
If there is a need for installing the tflite_runtime only, it is possible to build the tflite_runtime by yourself. The following document describes the differences between Bazel and CMake and how to build the tflite_runtime through them.
https://www.tensorflow.org/lite/guide/build_arm

Related

Cannot install snips-nlu on Raspberry Pi: Can not find Rust compiler

I followed these instructions to install snips-nlu on a Raspberry Pi:
Rust Installation: curl https://sh.rustup.rs -sSf | sh
Setuptools-rust: sudo python3 -m pip install setuptools-rust
NLU Installation: sudo python3 -m pip install snips-nlu
My console log:
Building wheels for collected packages: snips-nlu-utils, snips-nlu-parsers
.
.
. error: Can not find Rust compiler
I tried with different Python versions.
I found setuptools-rust, but it did not help, because I don't understand what I should do with it.
How can I fix this Rust compiler error message and install snips-nlu on a Raspberry Pi?
After install Rust compiler:
curl https://sh.rustup.rs -sSf | sh
You can try a restart and then continue the installation of NLU.
Restart is to ensure that path of Rust is being recorded in PATH.

unable to install tensorflow model server

I am trying to deploy my model on tensorflow serving. But I am facing issue with the installation of tensorflow model server itself. Do I need to install anything else before model server can be installed? I am using python v3.6 and tensorflow version 1.12.0 currently on VM.
conda install tensorflow-model-server
pip install tensorflow-model-server
Below are the two ways using which I am trying to install:
using conda install which gives me below error.
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
tensorflow-model-server
using pip which is says:
Collecting tensorflow-model-server
Could not find a version that satisfies the requirement tensorflow-model-server (from versions: )
No matching distribution found for tensorflow-model-server
Did you try to follow instruction that are provide into documentation?
At very first, you should try to Add Tensorflow Service as package source using instructions as below
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 -
# then install
apt-get update && apt-get install tensorflow-model-server
For more information, please look at link below:
Tensorflow Serving doc

Unable to find libssl.so.1.0.2 and libssl.so.1.0.2 when trying to use PyODBC on a Docker image

I have a docker file which uses python:3 (based on debian). I am installing the drivers for PyODBC as per the microsoft docs.
FROM python:3
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
apt-get update && \
ACCEPT_EULA=Y apt-get install msodbcsql17 unixodbc-dev -y
I can build the image, but when trying to run it I get the error: Can't open lib /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1
I have ran: ldd /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1 and get the output that says the below two libs cannot be found:
libcrypto.so.1.0.2 => not found
libssl.so.1.0.2 => not found
I have also tried dpkg --search libssl and dpkg --search libsslcrypto which yielded:
libssl1.1:amd64: /usr/lib/x86_64-linux-gnu/libssl.so.1.1
libssl1.1:amd64: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
From ldd /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1 there are other libraries being picked up in /usr/lib/x86_64-linux-gnu/
Very new to docker/linux, so how can I install libcrypto.so.1.0.2 and libssl.so.1.0.2 or downgrade the versions in '/usr/lib/x86_64-linux-gnu/' so that they can be used for msodbcsql17 (have tried apt get -y install libssl1.0=1.0.2) ?
The docker image python:3 appears to be built on Debian 10.
The package repository you are installing appears to be built for Debian 9, and does not appear to be compatible with Debian 10.
You should probably be using the repository with packages built for Debian 10 to get compatible packages.

Yum cannot find the package I want to install

I am trying to a simple command sudo yum install SDL2. I know that this package exists as per the SDL website:
Red Hat-based systems (including Fedora) can simply do "sudo yum install SDL2" to get the library installed system-wide, or "sudo yum install SDL2-devel" to get headers and other build requirements ready for compiling your own SDL programs.
However, when I try to execute my command, I get the following:
Setting up Install Process
No package SDL2 available.
Error: Nothing to do
I am using Red Hat Enterprise Linux Server release 5.3 (Tikanga). How can I go about getting yum to locate this package?
ONLY SDL is available on redhat 5.3
uname -r
2.6.32-573.12.1.el6.centos.plus.x86_64
yum search sdl-devel --verbose
SDL-devel.x86_64 : Files needed to develop Simple DirectMedia Layer applications
Repo : base
With Fedora 26, SDL2 is available in repo fedora
uname -r
4.11.0-2.fc26.x86_64
dnf --disablerepo="*" --enablerepo="fedora" search sdl2-devel --verbose
SDL2-devel.x86_64 : Files needed to develop Simple DirectMedia Layer applications
Repo : fedora

(ONIE) stg: command not found and Error 127 in Ubuntu terminal

I was trying to follow this guide: https://github.com/opencomputeproject/onie/blob/master/machine/kvm_x86_64/INSTALL but have gotten stuck.
On this line: make MACHINE=kvm_x86_64 all, I get stg: command not found when it is trying to apply a patch. I get Error 127 on a make command. Here's the output:
I have g++ and git installed. What am I doing wrong?
From the ONIE project wiki Building ONIE:
For a Debian-based system, a Makefile target exists that installs the required packages on your build machine. The ONIE project will maintain this target for the current stable version of Debian. This target requires the use of sudo(8), since package installation requires root privileges:
$ cd build-config
$ sudo apt-get update
$ sudo apt-get install build-essential
$ make debian-prepare-build-host
I built this on Ubuntu Desktop 15.04. For anyone else trying to build ONIE virtual machine, install these packages first:
Packages
qemu-kvm
git
stg
gperf
bison
flex
autoconf
texinfo
gawk
libtool
libtool-bin
libncurses5-dev
libexpat1
libexpat1-dev
python2.7-dev
python3.4-dev
xorriso
You can install most of these with sudo apt-get install <package>. You should be able to follow the ONIE guide now and set it up. Thanks to EtanReisner for all the help!
On Ubuntu, install stg package by,
sudo apt-get install stgit
the error stg: command not found should be resolved.

Resources