Changeset View
Standalone View
package.yml
| name : pytorch | name : pytorch | ||||
| version : 1.0.1 | version : 1.1.0 | ||||
| release : 1 | release : 2 | ||||
| source : | source : | ||||
| - git|https://github.com/pytorch/pytorch : v1.0.1 | - git|https://github.com/pytorch/pytorch : v1.1.0 | ||||
| - https://github.com/asmjit/asmjit/archive/673dcefaa048c5f5a2bf8b85daf8f7b9978d018a.tar.gz : 9c59802895a7812d6ce63f25abf9ad75fe651ab7b550d79cd266fee34bfedfeb | |||||
| license : BSD-3-Clause | license : BSD-3-Clause | ||||
| component : programming.python | component : programming.python | ||||
| summary : Tensors and Dynamic neural networks in Python with strong GPU acceleration | summary : | ||||
| - Tensors and Dynamic neural networks in Python with strong GPU acceleration | |||||
| - devel : 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 : | |||||
JoshStrobl: What is networking being turned on for? | |||||
Done Inline ActionsWhen running the cmake configure step (invoked by the setup.py script), it will download a package named asmjit. This is what the network is for. One other choice is let the asmjit source code be another source in package.yml and specify its location before running setup.py. xulongwu4: When running the `cmake` configure step (invoked by the `setup.py` script), it will download a… | |||||
Done Inline ActionsI would much rather it be another dependency if possible. JoshStrobl: I would much rather it be another dependency if possible. | |||||
| - devel : | |||||
| - /usr/lib64 # Install /usr/lib64/lib*.so.* to the devel subpackage | |||||
| builddeps : | builddeps : | ||||
| - pkgconfig(eigen3) | - pkgconfig(eigen3) | ||||
| - pkgconfig(gflags) | - pkgconfig(gflags) | ||||
| - pkgconfig(libavcodec) | - pkgconfig(libavcodec) | ||||
| - pkgconfig(libglog) | - pkgconfig(libglog) | ||||
| - pkgconfig(libzmq) | - pkgconfig(libzmq) | ||||
| - pkgconfig(ompi) | - pkgconfig(ompi) | ||||
| - pkgconfig(openblas) | - pkgconfig(openblas) | ||||
| - pkgconfig(opencv) | - pkgconfig(opencv) | ||||
| - pkgconfig(protobuf) | - pkgconfig(protobuf) | ||||
| - pkgconfig(python3) | - pkgconfig(python3) | ||||
| - leveldb-devel | - leveldb-devel | ||||
| - lmdb-devel | - lmdb-devel | ||||
| - numpy | - numpy | ||||
| - python-typing | - python-typing | ||||
| - pyyaml | - pyyaml | ||||
| - snappy-devel | - snappy-devel | ||||
| rundeps : | rundeps : | ||||
| - numpy | - numpy | ||||
| - python-cffi | - python-cffi | ||||
| - pyyaml | - pyyaml | ||||
| setup : | | |||||
| %patch -p1 < $pkgfiles/build_flags.patch | |||||
| mkdir -p third_party/asmjit | |||||
| tar -zxvf $sources/*.tar.gz -C third_party/asmjit --strip-components=1 | |||||
| build : | | build : | | ||||
| export BLAS=OpenBLAS | |||||
| export BUILD_BINARY=1 | export BUILD_BINARY=1 | ||||
| export USE_FFMPEG=1 | export USE_FFMPEG=1 | ||||
| export USE_LEVELDB=1 | export USE_LEVELDB=1 | ||||
| export USE_LMDB=1 | export USE_LMDB=1 | ||||
| export USE_OPENCV=1 | export USE_OPENCV=1 | ||||
| export EXTRA_CAFFE2_CMAKE_FLAGS="-DBLAS=OpenBLAS | export USE_GFLAGS=1 | ||||
| -DBUILD_CUSTOM_PROTOBUF=OFF | export USE_GLOG=1 | ||||
| -DUSE_GFLAGS=ON | export USE_ZMQ=1 | ||||
| -DUSE_GLOG=ON | export USE_MKLDNN=0 | ||||
| -DUSE_OPENMP=ON | export ASMJIT_SRC_DIR=$workdir/third_party/asmjit | ||||
| -DUSE_SYSTEM_EIGEN_INSTALL=ON | |||||
| -DUSE_ZMQ=ON" | |||||
| # Force to use system protobuf | |||||
| rm -rfv third_party/protobuf | |||||
| %python3_setup | %python3_setup | ||||
| install : | | install : | | ||||
| %python3_install --skip-build | %python3_install --skip-build | ||||
| install -dm00755 $installdir/usr/bin $installdir/usr/include $installdir/%libdir%/cmake | |||||
| TORCH_PATH=$(python3 -c "import site; print(site.getsitepackages()[0])")/torch | |||||
| for f in $installdir/$TORCH_PATH/bin/*; do | |||||
| ln -sv $TORCH_PATH/bin/`basename $f` $installdir/usr/bin | |||||
| done | |||||
Done Inline ActionsShould be able to just do ln -sv $TORCH_PATH/bin/* $installdir/usr/bin/ JoshStrobl: Should be able to just do `ln -sv $TORCH_PATH/bin/* $installdir/usr/bin/` | |||||
Done Inline ActionsThis does not seem a solution in this case. The packages are installed in $installdir/$TORCH_PATH/bin. So $TORCH_PATH/bin/* will just be empty in my opinion. xulongwu4: This does not seem a solution in this case. The packages are installed in… | |||||
| # Configure libtorch | |||||
| for f in $installdir/$TORCH_PATH/share/cmake/*; do | |||||
| ln -sv $TORCH_PATH/share/cmake/`basename $f` $installdir/%libdir%/cmake | |||||
| done | |||||
Done Inline ActionsSee bin comment for likely more optimal method. JoshStrobl: See bin comment for likely more optimal method. | |||||
Done Inline ActionsSee comments above. xulongwu4: See comments above. | |||||
| for f in $installdir/$TORCH_PATH/include/*; do | |||||
| ln -sv $TORCH_PATH/include/`basename $f` $installdir/usr/include | |||||
| done | |||||
Done Inline ActionsSee bin comment for likely more optimal method. JoshStrobl: See bin comment for likely more optimal method. | |||||
Done Inline ActionsSee comments above. xulongwu4: See comments above. | |||||
| for f in $installdir/$TORCH_PATH/lib/lib*.so*; do | |||||
| ln -sv $TORCH_PATH/lib/`basename $f` $installdir/%libdir% | |||||
| done | |||||
Done Inline ActionsSee bin comment for likely more optimal method. JoshStrobl: See bin comment for likely more optimal method. | |||||
Done Inline ActionsSee comments above. xulongwu4: See comments above. | |||||
What is networking being turned on for?