Reputation: 50
I am trying to create 2 simple Yocto Python Recipes for NVIDIA Specific PyTorch and Tensorflow Python whl packages. The target is an SD Card Image for the NVIDIA Jetson Nano produced by Yocto from the meta-tegra layer. I can successfully compile and boot an image from meta-tegra without these recipes.
NVIDIA themselves have compiled and released the ".whl" Python packages and they are found here: https://devtalk.nvidia.com/default/topic/1048776/official-tensorflow-for-jetson-nano-/ https://devtalk.nvidia.com/default/topic/1049071/jetson-nano/pytorch-for-jetson-nano/
I have tried the following, but both recipes fail with various errors ( Not found license, missing setup.py , etc .. )
SUMMARY = "NVIDIA's version of Python Torch"
DESCRIPTION = "NVIDIA's version of Python Torch"
HOMEPAGE = "https://nvidia.com"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=79aa8b7bc4f781210d6b5c06d6424cb0"
PR = "r0"
SRCNAME = "Pytorch"
SRC_URI = "https://nvidia.box.com/shared/static/j2dn48btaxosqp0zremqqm8pjelriyvs.whl"
SRC_URI[md5sum] = "9ec85425a64ca266abbfdeddbe92fb18"
SRC_URI[sha256sum] = "3b9b8f944962aaf550460409e9455d6d6b86083510b985306a8012d01d730b8b"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
CLEANBROKEN = "1"
SUMMARY = "NVIDIA's version of Python Tensorflow"
DESCRIPTION = "NVIDIA's version of Python Tensorflow"
HOMEPAGE = "https://nvidia.com"
SECTION = "devel/python"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://generic_BSD-3-Clause;md5=79aa8b7bc4f781210d6b5c06d6424cb0"
PR = "r0"
SRCNAME = "Tensorflow-gpu"
SRC_URI = "https://developer.download.nvidia.com/compute/redist/jp/v42/tensorflow-gpu/tensorflow_gpu-1.13.1+nv19.5-cp36-cp36m-linux_aarch64.whl"
SRC_URI[md5sum] = "ae649a62c274d19d1d096d97284ec2ee"
SRC_URI[sha256sum] = "6639761eccf53cab550d4afb4c8a13dbfe1b1d8051c62e14f83199667ae42d1a"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
CLEANBROKEN = "1"
I believe I have the dependencies installed in Yocto. How can I create Yocto recipes from these existing whl files? Thanks.
Upvotes: 0
Views: 1107
Reputation: 48
Probably (untested) something like needs to be added to your recipes:
DEPENDS += 'pip-native'
do_install() {
pip install ${S}/tensorflow_gpu-1.13.1+nv19.5-cp36-cp36m-linux_aarch64.whl
}
but there could be more tweaks necessary.
Upvotes: 2