marcoverl

user_data_centos7

May 26th, 2016
131
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  
  20. runcmd:
  21. - [ wget, "http://us.download.nvidia.com/XFree86/Linux-x86_64/352.93/NVIDIA-Linux-x86_64-352.93.run", -O, /root/NVIDIA-Linux-x86_64-352.93.run ]
  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.  - [ chmod, u+x, /root/NVIDIA-Linux-x86_64-352.93.run ]
  27.  - [ pip, install, --upgrade, pip ]
  28.  
  29. final_message: "The system is finally up, after $UPTIME seconds"
  30.  
  31. write_files:
  32.   - path: /root/install-gpu-driver.sh
  33.     permissions: 744
  34.     content: |
  35.      sh /root/NVIDIA-Linux-x86_64-352.93.run -s
  36.       nvidia-smi -pm 1
  37.       nvidia-smi -am 1
  38.   - path: /root/install-disvis.sh
  39.     permissions: 744
  40.     content: |
  41.      yum install -y libffi-devel fftw-libs fftw-devel fftw-libs-double fftw-libs-long fftw-libs-single
  42.       cd /usr/include
  43.       wget http://www.pd.infn.it/~verlato/GPU/opencl-files.tgz
  44.       tar zxvf opencl-files.tgz
  45.       rm -f opencl-files.tgz
  46.       pip install mako
  47.       pip install numpy
  48.       pip install pyfftw
  49.       pip install pyopencl==2015.1
  50.       cd /root
  51.       git clone https://github.com/clMathLibraries/clFFT.git
  52.       git clone https://github.com/haddocking/disvis.git
  53.       git clone https://github.com/geggo/gpyfft.git
  54.       cd /root/clFFT/src
  55.       cmake CMakeLists.txt
  56.       make install
  57.       cd /root/gpyfft
  58.       git checkout b462420e19a534d832a9925f01109e80d3431de2
  59.       python setup.py install
  60.       cd /root/disvis
  61.       python setup.py install
  62.       cd /home
  63.       wget http://www.pd.infn.it/~verlato/GPU/appl-files.tgz
  64.       tar zxvf appl-files.tgz
  65.       rm -f appl-files.tgz
  66.       # Testing DisVis (~20s on Tesla K20m)
  67.       # /home/run-disvisGPU.sh
  68.       # nvidia-smi --query-accounted-apps=pid,gpu_serial,gpu_name,gpu_utilization,time --format=csv
  69.  
  70.   - path: /root/install-powerfit.sh
  71.     permissions: 744
  72.     content: |
  73.      yum install -y libxml2-devel libxslt1-devel libffi-devel fftw-libs fftw-devel fftw-libs-double fftw-libs-long fftw-libs-single
  74.       cd /usr/include
  75.       wget http://www.pd.infn.it/~verlato/GPU/opencl-files.tgz
  76.       tar zxvf opencl-files.tgz
  77.       rm -f opencl-files.tgz
  78.       pip install mako
  79.       pip install numpy
  80.       pip install scipy
  81.       pip install virtualenv
  82.       pip install pyfftw
  83.       pip install pyopencl==2015.1
  84.       cd /root
  85.       git clone https://github.com/clMathLibraries/clFFT.git
  86.       git clone https://github.com/haddocking/powerfit.git
  87.       git clone https://github.com/geggo/gpyfft.git
  88.       cd /root/clFFT/src
  89.       cmake CMakeLists.txt
  90.       make install
  91.       cd /root/gpyfft
  92.       git checkout b462420e19a534d832a9925f01109e80d3431de2
  93.       python setup.py install
  94.       cd /root/powerfit
  95.       python setup.py install
  96.       cd /home
  97.       wget http://www.pd.infn.it/~verlato/GPU/appl-files.tgz
  98.       tar zxvf appl-files.tgz
  99.       rm -f appl-files.tgz
  100.       # Testing PowerFit (~90s on Tesla K20m)
  101.       # /home/run-powerfitGPU.sh
  102.       # nvidia-smi --query-accounted-apps=pid,gpu_serial,gpu_name,gpu_utilization,time --format=csv
  103.  
  104. users:
  105.   - name: centos
  106.     sudo: ALL=(ALL) NOPASSWD:ALL
  107.     lock-passwd: true
  108.     ssh-import-id: centos
  109.     ssh-authorized-keys:
  110.      - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAuNBEiH455kxaEr8tWEjdqICI4PDnOus7hTx0Qvix05pySKQuQlSoALk8UsPSHSgFZj9ATpgFFSepACn0hnHu9DISGHn6aIWE8snUc5UctWMlzNoutTngooSjYQxRPZTfHcntjgd5T0Amfqgn1PjO8qaseKLmsR87FhG7Pfe6yodnxqFXu2rzhFYbzkB9MdkFGplCjCT+8+YaGyThxEvB33YHP5hNzCtdqrJ/ojGUgPRZ9QwxrJLgwMOe6EKrngJsVQUfF82CvpQltH82mPDEWCBtLUOx+Mo/PFrvcDMZbgbIEIp9kOPeRLD3jRGObYuANJYaVoxir9N9N2TFbbcDHQ== verlato@prod-ui-02.pd.infn.it
  111.  
  112. power_state:
  113.  mode: reboot
  114.  message: Bye Bye
  115.  timeout: 600
  116.  condition: True
RAW Paste Data