Changes for ethminer.

This commit is contained in:
Hyperling 2021-02-11 12:12:52 -06:00
parent bdde2cb909
commit 60ce1e2f93
3 changed files with 29 additions and 21 deletions

View File

@ -64,12 +64,16 @@
# Additional setup for miners!
- name: Main | Workstation UI Setup
- name: Main | Miner Setup
hosts: miner
connection: local
become: true
pre_tasks:
- name: What are we mining?
debug:
var: mine
- include: tasks/miner/acct_mgmt/mfn.yml
tasks:
@ -82,7 +86,7 @@
- include: tasks/miner/drivers/amdgpu.yml
when: ansible_distribution == "Ubuntu" and mine.eth is defined
- include: tasks/miner/gpu/eth/ethminer.yml
- include: tasks/miner/gpu/ethminer.yml
become_user: mfn
when: ansible_distribution == "Ubuntu" and mine.eth is defined

View File

@ -1,30 +1,34 @@
---
# Install OpenCL drivers.
- name: Check If Installed
- name: AMDGPU | Check If Installed
shell: 'which amdgpu-pro-uninstall'
register: amdgpu_installed
- name: Folder
- name: AMDGPU | Debug
debug:
var: amdgpu_installed
- name: AMDGPU | Folder
shell: 'mkdir -p Downloads'
when: amdgpu_installed.stdout == ""
- name: Download
- name: AMDGPU | Download
shell: 'scp ling@leet:InstallFiles/Drivers/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz Downloads/'
when: amdgpu_installed.stdout == ""
- name: Extract
- name: AMDGPU | Extract
shell: 'cd Downloads; tar -xvf amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz'
when: amdgpu_installed.stdout == ""
- name: Install 1 - All
- name: AMDGPU | Install 1 - All
shell: 'cd Downloads/amdgpu-pro-20.45-1188099-ubuntu-20.04; amdgpu-install -y'
when: amdgpu_installed.stdout == ""
- name: Install 2 - Pro
- name: AMDGPU | Install 2 - Pro
shell: 'cd Downloads/amdgpu-pro-20.45-1188099-ubuntu-20.04; amdgpu-pro-install -y --opencl=pal,legacy'
when: amdgpu_installed.stdout == ""
- name: Delete
- name: AMDGPU | Delete
shell: 'rm -rf Downloads/*'
when: amdgpu_installed.stdout == ""

View File

@ -1,48 +1,48 @@
---
# Mine Ethereum with GPU!
- name: Install Dependencies
- name: Ethminer | Install Dependencies
package:
name: build-essential dkms cmake perl libdbus-1-dev mesa-common-dev
state: present
become: true
- name: Add PPA
- name: Ethminer | Add PPA
shell: 'add-apt-repository ppa:ethereum/ethereum; apt update'
become: true
- name: Install Ethereum
- name: Ethminer | Install Ethereum
package:
name: ethereum
state: present
become: true
- name: Clone Git Repo
- name: Ethminer | Clone Git Repo
shell: 'git clone https://github.com/ethereum-mining/ethminer.git'
- name: Update Repo's Repos
- name: Ethminer | Update Repo's Repos
shell: 'cd ethminer; git submodule update --init --recursive'
- name: Create Build Folder
- name: Ethminer | Create Build Folder
shell: 'cd ethminer; mkdir -p build'
- name: cmake Flags
- name: Ethminer | cmake Flags
shell: 'cd ethminer/build; cmake .. -DETHASHCL=ON -DETHASHCUDA=OFF -DAPICORE=ON -DBINKERN=ON -DETHDBUS=ON -DUSE_SYS_OPENCL=ON -ETHASHCPU=ON -DEVBUILD=ON'
- name: cmake Build
- name: Ethminer | cmake Build
shell: 'cd ethminer/build; cmake --build .'
- name: cmake Build
- name: Ethminer | make install
shell: 'cd /home/mfn/ethminer/build; make install'
become: true
- name: Download Script
- name: Ethminer | Download Script
shell: 'scp ling@leet:InstallFiles/Miners/ETH/ethminer.sh /home/mfn/; chmod 755 /home/mfn/ethminer.sh'
become: true
- name: Kill Current Jobs
- name: Ethminer | Kill Current Jobs
shell: 'killall ethminer.sh'
become: true
- name: Start Mining
- name: Ethminer | Start Mining
shell: 'time ethminer.sh'