Last active
June 20, 2017 17:29
-
-
Save wate/e19971f6f3d6559333d7a7f3ea2228ac to your computer and use it in GitHub Desktop.
高火力コンピューティングのセットアップ用?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by https://www.gitignore.io/api/vagrant | |
### Vagrant ### | |
.vagrant/ | |
# End of https://www.gitignore.io/api/vagrant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: all | |
become: yes | |
vars: | |
python_version: 2.7.13 | |
tasks: | |
- name: add apt signing key | |
apt_key: | |
url: "http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/7fa2af80.pub" | |
- name: add cuda repository | |
apt_repository: | |
repo: "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64 /" | |
filename: cuda | |
- name: install cuda | |
apt: | |
name: cuda | |
- name: install pyenv dependency packages | |
apt: | |
name: "{{ item }}" | |
with_items: | |
- python-dev | |
- python-pip | |
- git | |
- gcc | |
- make | |
- openssl | |
- libssl-dev | |
- libbz2-dev | |
- libreadline-dev | |
- libsqlite3-dev | |
- python3-tk | |
- tk-dev | |
- python-tk | |
- libfreetype6-dev | |
- block: | |
- name: checkout pyenv | |
git: | |
repo: https://github.com/yyuu/pyenv.git | |
dest: ~/.pyenv | |
version: master | |
- name: add pyenv setting | |
blockinfile: | |
path: ~/.bashrc | |
marker: "# {mark} ANSIBLE pyenv MANAGED BLOCK" | |
block: | | |
export PYENV_ROOT=$HOME/.pyenv | |
export PATH=$PYENV_ROOT/bin:$PATH | |
eval "$(pyenv init -)" | |
- name: install python | |
command: ~/.pyenv/bin/pyenv install {{ python_version }} | |
args: | |
creates: ~/.pyenv/versions/{{ python_version }} | |
- name: change python version | |
command: ~/.pyenv/bin/pyenv local {{ python_version }} | |
- name: add cuda setting | |
blockinfile: | |
path: ~/.bashrc | |
marker: "# {mark} ANSIBLE cuda MANAGED BLOCK" | |
block: | | |
export CUDA_HOME=/usr/local/cuda | |
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64 | |
export PATH=${CUDA_HOME}/bin:${PATH} | |
become: no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "bento/ubuntu-14.04" | |
config.vm.provider "virtualbox" do |vb| | |
vb.memory = "1024" | |
end | |
config.vm.provision "ansible" do |ansible| | |
ansible.playbook = "playbook.yml" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment