build.sh 529 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. # Limit Ninja's number of processes to 1 to prevent OOM
  8. # TODO: Can we do 2 jobs?
  9. export MAX_JOBS=1
  10. export TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX"
  11. # Install requirements
  12. $python_executable -m pip install wheel packaging
  13. $python_executable -m pip install -r requirements-cuda.txt
  14. # Build
  15. $python_executable setup.py bdist_wheel --dist-dir=dist