build.sh 432 B

123456789101112131415161718
  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. export MAX_JOBS=1
  9. # Install requirements
  10. $python_executable -m pip install wheel packaging
  11. $python_executable -m pip install -r requirements.txt
  12. # Build
  13. $python_executable setup.py bdist_wheel --dist-dir=dist