Advertisement
marcoverl

new_user_data_centos7

Jan 19th, 2017
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.83 KB | None | 0 0
  1. #cloud-config
  2.  
  3. package_upgrade: true
  4.  
  5. packages:
  6. - wget
  7. - tar
  8. - git
  9. - kernel-devel
  10. - kernel-headers
  11. - gcc
  12. - make
  13. - cmake
  14. - Xorg
  15. - python-devel
  16. - python-pip
  17. - gcc-c++
  18. - Cython
  19. - http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-repo-rhel7-8.0.44-1.x86_64.rpm
  20.  
  21. runcmd:
  22. - [ modprobe, -r, nouveau ]
  23. - [ sed, -i, -e, 's/quiet/quiet rdblacklist=nouveau/g', /etc/default/grub ]
  24. - echo 'blacklist nouveau' >/etc/modprobe.d/disable-nouveau.conf
  25. - [ grub2-mkconfig, -o, /boot/grub2/grub.cfg ]
  26. - [ pip, install, --upgrade, pip ]
  27. - [ yum, install, -y, cuda ]
  28. - [ nvidia-smi, -pm, 1]
  29. - [ nvidia-smi, -am, 1]
  30. - [ ln, -s, /usr/local/cuda/lib64/libOpenCL.so, /usr/lib/libOpenCL.so ]
  31.  
  32. final_message: "The system is finally up, after $UPTIME seconds"
  33.  
  34. write_files:
  35. - path: /root/install-disvis.sh
  36. permissions: 744
  37. content: |
  38. yum install -y libffi-devel fftw-libs fftw-devel fftw-libs-double fftw-libs-long fftw-libs-single
  39. cd /usr/include
  40. wget http://www.pd.infn.it/~verlato/GPU/opencl-files.tgz
  41. tar zxvf opencl-files.tgz
  42. rm -f opencl-files.tgz
  43. pip install mako
  44. pip install numpy
  45. pip install pyfftw
  46. pip install pyopencl
  47. cd /root
  48. git clone https://github.com/clMathLibraries/clFFT.git
  49. git clone https://github.com/haddocking/disvis.git
  50. git clone https://github.com/geggo/gpyfft.git
  51. cd /root/clFFT/src
  52. cmake CMakeLists.txt
  53. make install
  54. cd /root/gpyfft
  55. git checkout b462420e19a534d832a9925f01109e80d3431de2
  56. python setup.py install
  57. cd /root/disvis
  58. python setup.py install
  59. cd /home
  60. wget http://www.pd.infn.it/~verlato/GPU/appl-files.tgz
  61. tar zxvf appl-files.tgz
  62. rm -f appl-files.tgz
  63. # Testing DisVis (~20s on Tesla K20m)
  64. # /home/run-disvisGPU.sh
  65. # nvidia-smi --query-accounted-apps=pid,gpu_serial,gpu_name,gpu_utilization,time --format=csv
  66.  
  67. - path: /root/install-powerfit.sh
  68. permissions: 744
  69. content: |
  70. yum install -y libxml2-devel libxslt1-devel libffi-devel fftw-libs fftw-devel fftw-libs-double fftw-libs-long fftw-libs-single
  71. cd /usr/include
  72. wget http://www.pd.infn.it/~verlato/GPU/opencl-files.tgz
  73. tar zxvf opencl-files.tgz
  74. rm -f opencl-files.tgz
  75. pip install mako
  76. pip install numpy
  77. pip install scipy
  78. pip install virtualenv
  79. pip install pyfftw
  80. pip install pyopencl
  81. cd /root
  82. git clone https://github.com/clMathLibraries/clFFT.git
  83. git clone https://github.com/haddocking/powerfit.git
  84. git clone https://github.com/geggo/gpyfft.git
  85. cd /root/clFFT/src
  86. cmake CMakeLists.txt
  87. make install
  88. cd /root/gpyfft
  89. git checkout b462420e19a534d832a9925f01109e80d3431de2
  90. python setup.py install
  91. cd /root/powerfit
  92. python setup.py install
  93. cd /home
  94. wget http://www.pd.infn.it/~verlato/GPU/appl-files.tgz
  95. tar zxvf appl-files.tgz
  96. rm -f appl-files.tgz
  97. # Testing PowerFit (~90s on Tesla K20m)
  98. # /home/run-powerfitGPU.sh
  99. # nvidia-smi --query-accounted-apps=pid,gpu_serial,gpu_name,gpu_utilization,time --format=csv
  100.  
  101. users:
  102. - name: centos
  103. sudo: ALL=(ALL) NOPASSWD:ALL
  104. lock-passwd: true
  105. ssh-import-id: centos
  106. ssh-authorized-keys:
  107. - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAuNBEiH455kxaEr8tWEjdqICI4PDnOus7hTx0Qvix05pySKQuQlSoALk8UsPSHSgFZj9ATpgFFSepACn0hnHu9DISGHn6aIWE8snUc5UctWMlzNoutTngooSjYQxRPZTfHcntjgd5T0Amfqgn1PjO8qaseKLmsR87FhG7Pfe6yodnxqFXu2rzhFYbzkB9MdkFGplCjCT+8+YaGyThxEvB33YHP5hNzCtdqrJ/ojGUgPRZ9QwxrJLgwMOe6EKrngJsVQUfF82CvpQltH82mPDEWCBtLUOx+Mo/PFrvcDMZbgbIEIp9kOPeRLD3jRGObYuANJYaVoxir9N9N2TFbbcDHQ== verlato@prod-ui-02.pd.infn.it
  108.  
  109. power_state:
  110. mode: reboot
  111. message: Bye Bye
  112. timeout: 300
  113. condition: True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement