-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.json
45 lines (45 loc) · 1.89 KB
/
template.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
"variables": {
"access_key": "{{env `access_key`}}",
"secret_key": "{{env `secret_key`}}",
"region": "{{env `region`}}",
"instance_type": "{{env `instance_type`}}"
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `access_key`}}",
"secret_key": "{{user `secret_key`}}",
"region": "{{user `region`}}",
"source_ami": "ami-80861296",
"instance_type": "{{user `instance_type`}}",
"ssh_username": "ubuntu",
"ami_name": "mogura-ethminer {{timestamp}}"
}],
"provisioners": [
{
"type": "shell",
"inline": [
"sleep 30",
"sudo apt-get -y update",
"sudo apt-get install wget",
"wget -P /tmp http://us.download.nvidia.com/tesla/375.66/nvidia-diag-driver-local-repo-ubuntu1604_375.66-1_amd64.deb",
"sudo dpkg -i /tmp/nvidia*.deb && rm /tmp/nvidia*.deb",
"wget -P /tmp http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb",
"sudo dpkg -i /tmp/cuda*.deb",
"sudo apt-get -y update",
"sudo apt-get -y install cuda",
"sudo apt-get -y install software-properties-common",
"sudo add-apt-repository -y ppa:ethereum/ethereum",
"sudo apt-get -y update",
"sudo apt-get install -y git cmake libcryptopp-dev libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential",
"git clone https://github.com/Genoil/cpp-ethereum/",
"cd cpp-ethereum",
"mkdir build",
"cd build",
"export CUDA_BIN_PATH=/usr/local/cuda-8.0",
"cmake -DBUNDLE=cudaminer ..",
"make -j8",
"export ENV GPU_FORCE_64BIT_PTR=0 GPU_MAX_HEAP_SIZE=100 GPU_USE_SYNC_OBJECTS=1 GPU_MAX_ALLOC_PERCENT=100 GPU_SINGLE_ALLOC_PERCENT=100"
]
}]
}