mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
libraries/pytorch: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
a367bdb02d
commit
54f0df6951
3 changed files with 12 additions and 5 deletions
|
@ -1,3 +1,7 @@
|
|||
Deep neural networks built on a tape-based autograd system.
|
||||
|
||||
This package is a library build, supporting CPU(not GPU).
|
||||
CUDA(nvidia GPU) support is untested, but might be picked up
|
||||
at buildtime if the environment is present.
|
||||
|
||||
Optional autodetected dependencies:
|
||||
OpenBLAS || blas
|
||||
|
|
|
@ -90,15 +90,13 @@ sed -i "/Werror=return-type/d" CMakeLists.txt
|
|||
# This seems harmless as these get recompiled again locally, but it slows down the building process.
|
||||
# See https://github.com/icecc/icecream/issues/336
|
||||
|
||||
unshare -n python3 setup.py build --cmake-only
|
||||
|
||||
cd build
|
||||
unshare -n cmake \
|
||||
-G Ninja \
|
||||
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
|
||||
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
|
||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||
-DCMAKE_CXX_STANDARD=17 \
|
||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||
-DLIBSHM_INSTALL_LIB_SUBDIR="lib$LIBDIRSUFFIX" \
|
||||
-DTORCH_INSTALL_LIB_DIR="lib$LIBDIRSUFFIX" \
|
||||
-DPYTHON_EXECUTABLE=$(which python3) \
|
||||
|
@ -120,6 +118,11 @@ cd build
|
|||
cd ..
|
||||
python3 setup.py install --root=$PKG
|
||||
|
||||
SITE="$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')"
|
||||
mkdir -p $PKG/$SITE/torch/{bin,lib}
|
||||
BIN=torch_shm_manager; ln -s /usr/bin/$BIN $PKG/$SITE/torch/bin/$BIN
|
||||
LIB=libtorch_global_deps.so; ln -s /usr/lib$LIBDIRSUFFIX/$LIB $PKG/$SITE/torch/lib/$LIB
|
||||
|
||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
|
||||
|
|
|
@ -7,6 +7,6 @@ DOWNLOAD_x86_64="https://github.com/pytorch/pytorch/releases/download/v2.3.0/pyt
|
|||
https://pypi.io/packages/source/s/six/six-1.11.0.tar.gz"
|
||||
MD5SUM_x86_64="786047d07da744410eb41493a1cd0687 \
|
||||
d12789f9baf7e9fb2524c0c64f1773f8"
|
||||
REQUIRES="oneTBB protobuf3 OpenBLAS typing-extensions"
|
||||
REQUIRES="protobuf3 typing-extensions"
|
||||
MAINTAINER="Johannes Schoepfer"
|
||||
EMAIL="slackbuilds@schoepfer.info"
|
||||
|
|
Loading…
Reference in a new issue