Last active
August 27, 2019 15:05
-
-
Save platisd/aeec6bdf88923976fd759d7b5fe939aa to your computer and use it in GitHub Desktop.
pytorch dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUMMARY = "Facebook PyTorch AI" | |
DESCRIPTION = "Facebook PyTorch AI" | |
HOMEPAGE = "https://pytorch.org/" | |
LICENSE = "MIT" | |
LIC_FILES_CHKSUM = "file://LICENSE;md5=acf4d595f99e159bf31797aa872aef57" | |
S = "${WORKDIR}" | |
LOCAL_INCLUDE = "${S}/libtorch/include" | |
LOCAL_LIB = "${S}/libtorch/lib" | |
TARGET_INCLUDE = "${D}${includedir}" | |
TARGET_LIB = "${D}${libdir}" | |
SRC_URI = "\ | |
https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-${PV}.zip \ | |
file://LICENSE \ | |
" | |
SRC_URI[md5sum] = "f34c5b6e46331f79100cd93522bad3ae" | |
INSANE_SKIP_${PN} = "ldflags" | |
INSANE_SKIP_${PN} += "already-stripped" | |
# Workaround for resolving the dependency of libtorch to libgomp-753e6e92.so.1 | |
INSANE_SKIP_${PN} += "file-rdeps" | |
INHIBIT_PACKAGE_STRIP = "1" | |
INHIBIT_SYSROOT_STRIP = "1" | |
SOLIBS = ".so" | |
FILES_SOLIBSDEV = "" | |
RDEPENDS_${PN} = " torch-deps" | |
do_install() { | |
# Create include directory | |
install -d ${TARGET_INCLUDE} | |
# Copy all header files | |
cp -R --no-dereference --preserve=mode,links -v ${LOCAL_INCLUDE}/* ${TARGET_INCLUDE} | |
# Create library directory | |
install -d ${TARGET_LIB} | |
# Install shared libraries | |
install -m 0755 ${LOCAL_LIB}/*.so ${TARGET_LIB} | |
} | |
FILES_${PN} += "\ | |
${includedir}/* \ | |
${libdir}/* \ | |
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUMMARY = "Facebook PyTorch AI" | |
DESCRIPTION = "Facebook PyTorch AI" | |
HOMEPAGE = "https://pytorch.org/" | |
LICENSE = "MIT" | |
LIC_FILES_CHKSUM = "file://LICENSE;md5=acf4d595f99e159bf31797aa872aef57" | |
S = "${WORKDIR}" | |
LOCAL_INCLUDE = "${S}/libtorch/include" | |
LOCAL_LIB = "${S}/libtorch/lib" | |
TARGET_INCLUDE = "${D}${includedir}" | |
TARGET_LIB = "${D}${libdir}" | |
SRC_URI = "\ | |
https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-${PV}.zip \ | |
file://LICENSE \ | |
" | |
SRC_URI[md5sum] = "f34c5b6e46331f79100cd93522bad3ae" | |
INSANE_SKIP_${PN} = "ldflags" | |
INHIBIT_PACKAGE_STRIP = "1" | |
INHIBIT_SYSROOT_STRIP = "1" | |
INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | |
RPROVIDES_${PN} = "libgomp-753e6e92.so.1" | |
do_install() { | |
# Create library directory | |
install -d ${TARGET_LIB} | |
# Install shared libraries | |
install -m 0755 ${LOCAL_LIB}/libgomp-753e6e92.so.1 ${D}${libdir} | |
} | |
FILES_${PN} += "\ | |
${libdir}/* \ | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment