Skip to content

Instantly share code, notes, and snippets.

@DrPaulBrewer
Last active July 8, 2017 04:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DrPaulBrewer/a8a976f24036c81f1777ef457e6d71ea to your computer and use it in GitHub Desktop.
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
# Working as of Dec 2016
FROM ubuntu:14.04
MAINTAINER drpaulbrewer@eaftc.com
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 you@youremail.com
CMD nice ./miner --server $SERVER --port $PORT --user $ACCT.$NICK --pass $PASS
#!/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