SHARE
TWEET

ansible_user_data_centos7

marcoverl Mar 17th, 2017 99 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.  - ansible
  10.  - kernel-devel
  11.  - kernel-headers
  12.  - gcc
  13.  - make
  14.  - cmake
  15.  - Xorg
  16.  - python-devel
  17.  - python-pip
  18.  - gcc-c++
  19.  - yum-utils
  20. runcmd:
  21.  - [ modprobe, -r, nouveau ]
  22.  - [ sed, -i, -e, 's/quiet/quiet rdblacklist=nouveau/g', /etc/default/grub ]
  23.  - echo 'blacklist nouveau' >/etc/modprobe.d/disable-nouveau.conf
  24.  - [ grub2-mkconfig, -o, /boot/grub2/grub.cfg ]
  25.  - [ ansible-galaxy, install, LIP-Computing.ansible-role-nvidia ]
  26.  
  27. final_message: "The system is finally up, after $UPTIME seconds"
  28.  
  29. users:
  30.   - name: centos7
  31.     sudo: ALL=(ALL) NOPASSWD:ALL
  32.     lock-passwd: true
  33.     ssh-import-id: centos7
  34.     ssh-authorized-keys:
  35.       - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAuNBEiH455kxaEr8tWEjdqICI4PDnOus7hTx0Qvix05pySKQuQlSoALk8UsPSHSgFZj9ATpgFFSepACn0hnHu9DISGHn6aIWE8snUc5UctWMlzNoutTngooSjYQxRPZTfHcntjgd5T0Amfqgn1PjO8qaseKLmsR87FhG7Pfe6yodnxqFXu2rzhFYbzkB9MdkFGplCjCT+8+YaGyThxEvB33YHP5hNzCtdqrJ/ojGUgPRZ9QwxrJLgwMOe6EKrngJsVQUfF82CvpQltH82mPDEWCBtLUOx+Mo/PFrvcDMZbgbIEIp9kOPeRLD3jRGObYuANJYaVoxir9N9N2TFbbcDHQ== verlato@prod-ui-02.pd.infn.it
  36.  
  37. write_files:  
  38.   - path: /root/install-gpu-driver.sh
  39.     permissions: 0744
  40.     content: |
  41.       ansible-playbook /etc/ansible/roles/LIP-Computing.ansible-role-nvidia/tests/install-vm.yml --extra-vars nvidia_driver_version=375.39
  42.       nvidia-smi -pm 1
  43.       nvidia-smi -am 1
  44.  
  45.   - path: /root/install-disvis.sh
  46.     permissions: 0744
  47.     content: |
  48.       curl -fsSL https://get.docker.com/ | sh
  49.       systemctl start docker
  50.       version=$(nvidia-smi | awk '/Driver Version/ {print $6}')
  51.       # Testing DisVis (~100s on Tesla K20m)
  52.       export WDIR=/usr/local/disvis/test-cases/PRE5-PUP2-complex
  53.       export ang=10.0
  54.       export vox=2
  55.       #./udocker run --hostenv dis375 disvis $WDIR/O14250.pdb $WDIR/Q9UT97.pdb $WDIR/restraints.dat -g -a $ang -vs $vox -d $WDIR/example-results
  56.       # nvidia-smi --query-accounted-apps=pid,gpu_serial,gpu_name,gpu_utilization,time --format=csv
  57.       docker run --name=dis1 --device=/dev/nvidia0:/dev/nvidia0 --device=/dev/nvidia1:/dev/nvidia1 --device=/dev/nvidiactl:/dev/nvidiactl --device=/dev/nvidia-uvm:/dev/nvidia-uvm -v /root:/home indigodatacloudapps/disvis:nvdrv_$version /bin/sh -c 'export WDIR=/usr/local/disvis/test-cases/PRE5-PUP2-complex; disvis $WDIR/O14250.pdb $WDIR/Q9UT97.pdb $WDIR/restraints.dat -g -a 10.0 -vs 2 -d /home/example-results'
  58.       nvidia-smi --query-accounted-apps=pid,gpu_serial,gpu_name,gpu_utilization,time --format=csv
  59.  
  60.   - path: /root/install-powerfit.sh
  61.     permissions: 0744
  62.     content: |
  63.       sudo curl -fsSL https://get.docker.com/ | sh
  64.       sudo systemctl start docker
  65.       version=$(nvidia-smi | awk '/Driver Version/ {print $6}')
  66.       #git clone https://github.com/indigo-dc/udocker
  67.       #cd udocker
  68.       #./udocker pull indigodatacloudapps/powerfit:nvdrv_$version
  69.       #./udocker create --name=pow  indigodatacloudapps/powerfit:nvdrv_$version
  70.       # Testing PowerFit (~5m on Tesla K20m)
  71.       wget http://www.pd.infn.it/~verlato/GPU/appl-files.tgz
  72.       tar zxvf appl-files.tgz
  73.       # export MAP=/home/centos/GroEL-GroES/1046.map
  74.       # export RESOL=46.0
  75.       # export ANG=4.71
  76.       # export PDB=/home/centos/GroEL-GroES/GroES_1gru.pdb
  77.       # export TYPE="-g"
  78.       # export OUT_DIR=/home/centos/outdir
  79.       # udocker/udocker run --hostenv --bindhome pow powerfit ${MAP} ${RESOL} ${PDB} -a $ANG -l ${TYPE} -d ${OUT_DIR}
  80.       time docker run --name=pow1 --device=/dev/nvidia0:/dev/nvidia0 --device=/dev/nvidia1:/dev/nvidia1 --device=/dev/nvidiactl:/dev/nvidiactl --device=/dev/nvidia-uvm:/dev/nvidia-uvm -v /root:/home indigodatacloudapps/powerfit:nvdrv_$version /bin/sh -c 'powerfit /home/GroEL-GroES/1046.map 46.0 /home/GroEL-GroES/GroES_1gru.pdb -a 4.71 -l -g -d /home/out'
  81.       nvidia-smi --query-accounted-apps=pid,gpu_serial,gpu_name,gpu_utilization,time --format=csv
  82.  
  83. power_state:
  84.  mode: reboot
  85.  delay: "+1"
  86.  message: Bye Bye
  87.  timeout: 120
  88.  condition: True
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top