go-rknnlite: can't follow the example. the docker image lacking package?
here is the docker command on example
"A prebuilt [docker image](https://hub.docker.com/repository/docker/swdee/go-rknnlite/general) is available as swdee/go-rknnlite:latest which contains a Debian bookworm OS base with Golang, OpenCV, and GoCV configured.
You can use this image to run your own application or the go-rknnlite examples. For example to run the [MobileNet Demo](https://github.com/swdee/go-rknnlite/blob/master/example/mobilenet) use the following commands.
# from project root directory
docker run --rm \
--device /dev/dri:/dev/dri \
-v "$(pwd):/go/src/app" \
-v "$(pwd)/example/data:/go/src/data" \
-v "/usr/include/rknn_api.h:/usr/include/rknn_api.h" \
-v "/usr/lib/librknnrt.so:/usr/lib/librknnrt.so" \
-w /go/src/app \
swdee/go-rknnlite:latest \
go run ./example/mobilenet/mobilenet.go"
here is my command on my terminal:
docker run --rm -it \
--device /dev/dri:/dev/dri \
-v "$(pwd):/go/src/app" \
-v "$(pwd)/example/data:/go/src/data" \
-v "/usr/include:/usr/include" \
-v "/usr/lib/librknnrt.so:/usr/lib/librknnrt.so" \
-e CGO_CFLAGS="-I/usr/include" \
-e CGO_LDFLAGS="-L/usr/lib -lrknnrt" \
-w /go/src/app \
swdee/go-rknnlite:latest \
go run ./example/stream/bytetrack.go -a :8080 -s 3 -x person
"
and here is log error
" docker run --rm -it \
–device /dev/dri:/dev/dri \
-v “$(pwd):/go/src/app” \ -v “$(pwd)/example/data:/go/src/data” \ -v “/usr/include:/usr/include” \ -v “/usr/lib/librknnrt.so:/usr/lib/librknnrt.so” \ -e CGO_CFLAGS=“-I/usr/include” \ -e CGO_LDFLAGS=“-L/usr/lib -lrknnrt” \ -w /go/src/app \ swdee/go-rknnlite:latest \ go run ./example/stream/bytetrack.go -a :8080 -s 3 -x person go: downloading github.com/ctessum/go.clipper v0.1.2 go: downloading gonum.org/v1/gonum v0.15.0
gocv.io/x/gocv
In file included from /usr/local/include/opencv4/opencv2/core.hpp:52, from /usr/local/include/opencv4/opencv2/opencv.hpp:52, from aruco.h:5, from aruco.cpp:1: /usr/local/include/opencv4/opencv2/core/cvdef.h:185:10: fatal error: limits No such file or directory
185 | #include “limits”
| ^~~~~~~~
compilation terminated.
"
In my understanding it lacking this package "opencv4" which should be inside "[GoCV](https://gocv.io/) is used for image processing. Depending on GoCV's configuration this has subdependencies such as OpenCV, FFMpeg, GStreamer etc which make for a complicated build process. You can either follow [GoCV's installation instructions](https://github.com/hybridgroup/gocv/tree/release#how-to-install) or follow our instructions below."
so i wonder this docker image "swdee/go-rknnlite:latest " have the package preinstalled or which thing should i do wrong.
thank you
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 30 (16 by maintainers)
Stop the vscode
nodeprocesses you have running to free up some RAM and any other large processes and see if that frees up enough RAM to run.I have not experienced that SIGILL error. There is one similar report here.
I am still using an older version of rknn-toolkit with python 3.9.18
I had a look at the zero3 ubuntu image and it doesn’t have the rknn-toolkit files
rknn_api.handlibrknnrt.so, so that explains why they are not there.You could either try Radxa’s debian image or try copying the
rknn_api.handlibrknnrt.sofiles across. However you might have other problems if the NPU driver and device tree is not properly setup in Joshua’s ubuntu image so I don’t know if manually copying files across will work successfully.