Changeset View
Changeset View
Standalone View
Standalone View
package.yml
| name : pytorch | name : pytorch | ||||
| version : 1.3.1 | version : 1.8.1 | ||||
| release : 7 | release : 8 | ||||
| source : | source : | ||||
| - git|https://github.com/pytorch/pytorch : v1.3.1 | - git|https://github.com/pytorch/pytorch : v1.8.1 | ||||
| license : BSD-3-Clause | license : BSD-3-Clause | ||||
| component : | component : | ||||
| - programming.python | - programming.python | ||||
| - ^libtorch : programming.library | - ^libtorch : programming.library | ||||
| summary : | summary : | ||||
| - Tensors and Dynamic neural networks in Python with strong GPU acceleration | - Tensors and Dynamic neural networks in Python with strong GPU acceleration | ||||
| - ^libtorch : PyTorch C++ API | - ^libtorch : PyTorch C++ API | ||||
| description: | | description: | | ||||
| PyTorch is an optimized tensor library for deep learning using GPUs and CPUs. | PyTorch is an optimized tensor library for deep learning using GPUs and CPUs. | ||||
| patterns : | patterns : | ||||
| - ^libtorch : | - ^libtorch: | ||||
| - /usr/include | |||||
| - /usr/lib64 | - /usr/lib64 | ||||
| - ^libtorch-devel: | |||||
| - /usr/lib64/cmake | |||||
| - /usr/include | |||||
| optimize : | optimize : | ||||
| - speed | - speed | ||||
| avx2 : yes | avx2 : yes | ||||
| clang : yes | |||||
| builddeps : | builddeps : | ||||
| - pkgconfig(Qt5Core) | |||||
JoshStrobl: This should be getting pulled in by your updated opencv. | |||||
| - pkgconfig(eigen3) | - pkgconfig(eigen3) | ||||
| - pkgconfig(gflags) | - pkgconfig(fftw3) | ||||
| - pkgconfig(hiredis) | |||||
Done Inline ActionsThis should be getting pulled in by rocksdb-devel. JoshStrobl: This should be getting pulled in by rocksdb-devel. | |||||
| - pkgconfig(libavcodec) | - pkgconfig(libavcodec) | ||||
| - pkgconfig(libglog) | - pkgconfig(libglog) | ||||
| - pkgconfig(libuv) | |||||
Done Inline ActionsThis should be getting pulled in by rocksdb-devel. JoshStrobl: This should be getting pulled in by rocksdb-devel. | |||||
| - pkgconfig(libzmq) | - pkgconfig(libzmq) | ||||
| - pkgconfig(ompi) | - pkgconfig(ompi) | ||||
Done Inline ActionsThis should be getting pulled in by rocksdb-devel. JoshStrobl: This should be getting pulled in by rocksdb-devel. | |||||
| - pkgconfig(openblas) | - pkgconfig(openblas) | ||||
Done Inline ActionsThis should be getting pulled in by your updated opencv. JoshStrobl: This should be getting pulled in by your updated opencv. | |||||
Done Inline ActionsIn this case opencv-devel does not depend entirely on OpenBLAS. YakoYakoYokuYoku: In this case `opencv-devel` does not depend entirely on OpenBLAS. | |||||
| - pkgconfig(opencv) | - pkgconfig(opencv) | ||||
Not Done Inline Actionsopencv4 joebonrichie: opencv4 | |||||
| - pkgconfig(protobuf) | - pkgconfig(protobuf) | ||||
| - pkgconfig(python3) | - pkgconfig(python3) | ||||
| - pkgconfig(rocksdb) | |||||
| - pkgconfig(shaderc) | |||||
| - intel-tbb-devel | |||||
| - leveldb-devel | - leveldb-devel | ||||
Done Inline ActionsGiven we will have rocksdb per your patch, surely this can be removed? JoshStrobl: Given we will have rocksdb per your patch, surely this can be removed? | |||||
Done Inline ActionsSome of LevelDB's functionalities are still required, hopefully in some later versions might get dropped. YakoYakoYokuYoku: Some of LevelDB's functionalities are still required, hopefully in some later versions might… | |||||
| - lmdb-devel | - lmdb-devel | ||||
| - numpy | - numpy | ||||
| # onednn-devel # FIXME: If you have more RAM than I do please test if you don't get a ZIP64 Extensions requirement | |||||
| - pybind11 | - pybind11 | ||||
| - python-typing | - python-typing-extensions | ||||
| - pyyaml | - pyyaml | ||||
| - snappy-devel | - vulkan-headers | ||||
Done Inline Actionsrocksdb has a pkgconfig per your patch, should use it. JoshStrobl: rocksdb has a pkgconfig per your patch, should use it. | |||||
| rundeps : | rundeps : | ||||
| - numpy | - numpy | ||||
| - python-cffi | - python-cffi | ||||
| - python-typing | |||||
| - python-typing-extensions | |||||
| - pyyaml | - pyyaml | ||||
| - ^libtorch : | - ^libtorch : | ||||
| - pybind11 | - pybind11 | ||||
| - ^libtorch-devel : | |||||
| - ffmpeg-devel | |||||
| - gflags-devel | |||||
| - glog-devel | |||||
| - libtorch | |||||
| replaces : | replaces : | ||||
| - ^libtorch : | - ^libtorch-devel : | ||||
| - pytorch-devel | - pytorch-devel | ||||
| environment: | | |||||
| # Good luck while debugging | |||||
| export CFLAGS="${CFLAGS/-g3/-gline-tables-only}" | |||||
| export CXXFLAGS="${CXXFLAGS/-g3/-gline-tables-only}" | |||||
| setup : | | |||||
| %patch -p1 < $pkgfiles/0001-Fix-build-warnings-treated-as-error-on-Linux.patch | |||||
| %patch -p1 < $pkgfiles/I-flag-instead-of-isystem.patch | |||||
| %patch -p1 < $pkgfiles/system-libuv.patch | |||||
| %patch -p1 < $pkgfiles/system-rocksdb.patch | |||||
| %patch -p1 < $pkgfiles/system-zstd.patch | |||||
| echo %version% > version.txt | |||||
| build : | | build : | | ||||
| export MAX_JOBS=4 | |||||
| %python3_setup --cmake-only | %python3_setup --cmake-only | ||||
| pushd ../py3build | pushd ../py3build | ||||
| %cmake build \ | %cmake build \ | ||||
| -DCMAKE_INSTALL_PREFIX=$PWD/torch \ | -DCMAKE_INSTALL_PREFIX=$PWD/torch \ | ||||
| -DBLAS=OpenBLAS \ | -DBLAS=OpenBLAS \ | ||||
| -DBUILD_BINARY=ON \ | -DBUILD_BINARY=ON \ | ||||
| -DBUILD_CUSTOM_PROTOBUF=OFF \ | -DBUILD_CUSTOM_PROTOBUF=OFF \ | ||||
| -DBUILD_TEST=OFF \ | -DBUILD_TEST=OFF \ | ||||
| -DUSE_FFMPEG=ON -DUSE_LEVELDB=ON \ | -DHAVE_SOVERSION=ON \ | ||||
| -DUSE_FFTW=ON \ | |||||
| -DUSE_FFMPEG=ON \ | |||||
| -DUSE_LEVELDB=ON \ | |||||
| -DUSE_LIBUV=ON \ | |||||
| -DUSE_LMDB=ON \ | -DUSE_LMDB=ON \ | ||||
| -DUSE_MKLDNN=OFF \ | -DUSE_MKLDNN=OFF \ | ||||
| -DUSE_OPENCV=ON \ | -DUSE_OPENCV=ON \ | ||||
| -DUSE_GFLAGS=ON \ | -DUSE_GFLAGS=ON \ | ||||
| -DUSE_GLOG=ON \ | -DUSE_GLOG=ON \ | ||||
| -DUSE_SYSTEM_EIGEN_INSTALL=ON \ | -DUSE_SYSTEM_EIGEN_INSTALL=ON \ | ||||
| -DUSE_ZMQ=ON | -DUSE_REDIS=ON \ | ||||
| -DUSE_ROCKSDB=ON \ | |||||
| -DUSE_TBB=ON \ | |||||
| -DUSE_VULKAN=ON \ | |||||
| -DUSE_ZMQ=ON \ | |||||
| -DUSE_ZSTD=ON | |||||
| python3 setup.py build | python3 setup.py build | ||||
| popd | popd | ||||
| install : | | install : | | ||||
| %python3_install | %python3_install | ||||
| # Configure libtorch | # Configure libtorch | ||||
| install -dm00755 $installdir/%libdir% | install -dm00755 $installdir/%libdir% | ||||
| TORCH_PATH=$(python3 -c "import site; print(site.getsitepackages()[0])")/torch | TORCH_PATH=$(python3 -c "import site; print(site.getsitepackages()[0])")/torch | ||||
| mv $installdir/$TORCH_PATH/lib/* $installdir/%libdir% | mv $installdir/$TORCH_PATH/lib/* $installdir/%libdir% | ||||
| TORCH_SONAME=$(echo %version% | perl -ne 'print $1 if /(\d+\.\d+)/;') | |||||
| pushd $installdir/usr/lib64 | |||||
| for lib in lib*.so.%version%; do | |||||
| so=${lib//.%version%/} | |||||
| ln -sf $lib $installdir/usr/lib64/$so | |||||
| ln -sf $lib $installdir/usr/lib64/$so.$TORCH_SONAME | |||||
| done | |||||
| popd | |||||
| if [ ! -z "${AVX2BUILD}" ]; then | if [ ! -z "${AVX2BUILD}" ]; then | ||||
| rm -rf $installdir/usr/lib/python* | rm -rf $installdir/usr/lib/python* | ||||
| else | else | ||||
| install -dm00755 $installdir/usr/include $installdir/%libdir%/cmake | install -dm00755 $installdir/usr/include $installdir/%libdir%/cmake | ||||
| mv $installdir/$TORCH_PATH/include/* $installdir/usr/include | mv $installdir/$TORCH_PATH/include/* $installdir/usr/include | ||||
| rm -rf $installdir/usr/include/pybind11 | rm -rf $installdir/usr/include/pybind11 | ||||
| mv $installdir/$TORCH_PATH/share/cmake/* $installdir/%libdir%/cmake | mv $installdir/$TORCH_PATH/share/cmake/* $installdir/%libdir%/cmake | ||||
| rm -rf $installdir/$TORCH_PATH/{include,lib,share/cmake} | rm -rf $installdir/$TORCH_PATH/{include,lib,share/cmake} | ||||
| ln -sv /usr/include $installdir/$TORCH_PATH/include | ln -sv /usr/include $installdir/$TORCH_PATH/include | ||||
| ln -sv %libdir% $installdir/$TORCH_PATH/lib | ln -sv %libdir% $installdir/$TORCH_PATH/lib | ||||
| ln -sv %libdir%/cmake $installdir/$TORCH_PATH/share/cmake | ln -sv %libdir%/cmake $installdir/$TORCH_PATH/share/cmake | ||||
| fi | fi | ||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.
This should be getting pulled in by your updated opencv.