build.sh 519 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. python_executable=python$1
  3. cuda_home=/usr/local/cuda-$2
  4. # Update paths
  5. PATH=${cuda_home}/bin:$PATH
  6. LD_LIBRARY_PATH=${cuda_home}/lib64:$LD_LIBRARY_PATH
  7. # Install requirements
  8. $python_executable -m pip install wheel packaging
  9. $python_executable -m pip install -r requirements-cuda.txt
  10. # Limit the number of parallel jobs to avoid OOM
  11. export MAX_JOBS=2
  12. export TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX"
  13. # Build
  14. $python_executable setup.py bdist_wheel --dist-dir=dist --py-limited-api=cp38