Last active
August 4, 2018 19:16
-
-
Save Thann/e3116067caca3412044a83702030739d to your computer and use it in GitHub Desktop.
Mine handshake with docker!
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
# HSD docker-miner setup | |
### Install docker | |
sudo apt-get update | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
sudo apt-get update | |
sudo apt-get install -y docker-ce #docker-compose | |
### Install nvidia-docker | |
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \ | |
sudo apt-key add - | |
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) | |
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \ | |
sudo tee /etc/apt/sources.list.d/nvidia-docker.list | |
sudo apt-get update | |
# Install nvidia-docker2 and reload the Docker daemon configuration | |
sudo apt-get install -y nvidia-docker2 nvidia-driver-390 | |
sudo usermod -aG docker $(whoami) | |
sudo pkill -SIGHUP dockerd | |
### install cuda | |
sudo apt-get install -y freeglut3 freeglut3-dev libxi-dev libxmu-dev | |
wget https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers/cuda_9.2.148_396.37_linux | |
chmod +x cuda_9.2.148_396.37_linux | |
./cuda_9.2.148_396.37_linux | |
### Install compose | |
sudo apt-get install -y python-pip jq | |
pip install docker-compose | |
### setup handshake | |
mkdir hsd | |
cd hsd | |
wget https://raw.githubusercontent.com/Thann/hsd/compose-ubuntu/docker-compose.yml | |
docker-compose up -d hsd | |
ADDR=$(docker exec hsd_hsd_1 hsw-cli address default --api-key=PASSWORD | jq .address) | |
sed -i s/COINBASE_ADDRESS/$ADDR/ docker-compose.yml | |
sed -i s/#--/--/ docker-compose.yml | |
docker-compose up -d | |
### Check coins | |
docker exec hsd_hsd_1 hsw-cli get --api-key=PASSWORD | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment