Last active
July 8, 2017 04:29
-
-
Save DrPaulBrewer/a8a976f24036c81f1777ef457e6d71ea to your computer and use it in GitHub Desktop.
Dockerfile and run script to mine zcash with EWBF and Dwarfpool. Pre-requisite: download and unzip EWBF into ./zec/miner
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
# Working as of Dec 2016 | |
FROM ubuntu:14.04 | |
MAINTAINER [email protected] | |
RUN apt-get update && apt-get --yes upgrade && apt-get --yes install iputils-ping less emacs24-nox git curl wget build-essential screen python-pip software-properties-common | |
RUN echo deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse >>/etc/apt/sources.list && \ | |
echo deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse >>/etc/apt/sources.list && \ | |
echo deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse >>/etc/apt/sources.list && \ | |
echo deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse >>/etc/apt/sources.list | |
RUN apt-get update && apt-get --yes --no-install-recommends install nvidia-cuda-dev nvidia-cuda-doc | |
RUN apt-get --no-install-recommends --yes install nvidia-367; exit 0 | |
RUN adduser --disabled-login zminer | |
USER zminer | |
WORKDIR /home/zminer | |
# This COPY copies the EWBF proprietary miner executable into the container ONLY if it is there | |
# Prerequisite: you must first manually download and extract the miner, and put it in ./zec/miner relative to docker build | |
COPY zec/miner /home/zminer/ | |
ENV ACCT tyourZcashAccountGoesHere | |
ENV SERVER zec-us1.dwarfpool.com | |
# PORT for single GPU machines. Check Dwarfpool docs for other configs. | |
ENV PORT 3335 | |
ENV NICK MakeUpANicknameForYourMiner | |
ENV PASS [email protected] | |
CMD nice ./miner --server $SERVER --port $PORT --user $ACCT.$NICK --pass $PASS |
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
#!/bin/bash | |
docker run -d \ | |
--device=/dev/nvidia0:/dev/nvidia0 \ | |
--device=/dev/nvidiactl:/dev/nvidiactl \ | |
--device=/dev/nvidia-uvm:/dev/nvidia-uvm \ | |
zcash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment