Skip to content

Instantly share code, notes, and snippets.

@marsmensch
Last active December 31, 2018 16:23
Show Gist options
  • Save marsmensch/9f1317296185812e49c8d38fd75d7576 to your computer and use it in GitHub Desktop.
Save marsmensch/9f1317296185812e49c8d38fd75d7576 to your computer and use it in GitHub Desktop.
suprminer linux docker container to mine Veil http://veil-project.com
#
# Dockerized suprminer for veil
#
#
# 1) To build the image locally, run:
# docker build -t marsmensch/veil-miner-nvidia:latest .
#
# If you want to run it within an interactive shell:
#
# 2) start the container
#
# docker run --interactive --tty --entrypoint=/bin/bash marsmensch/veil-miner-nvidia:latest
#
# 3) run ccminer manually
# ./ccminer -a x16rt -o stratum+tcp://veil.suprnova.cc:7220 -u marsy.donate -p x
#
# mine away!
#
FROM ubuntu:18.04
MAINTAINER Marsmensch <marsmensch@pm.me>
ENV REFRESHED_AT 2018-12-16
ENV GIT_PROJECT suprminer
ENV GIT_BRANCH "master"
ENV GIT_URL git://github.com/ocminer/${GIT_PROJECT}.git
# install dependencies
RUN apt-get autoclean && apt-get autoremove && apt-get update && \
apt-get -qqy install --no-install-recommends build-essential ubuntu-drivers-common \
git build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev \
unzip python zlib1g-dev wget bsdmainutils automake curl software-properties-common \
libcurl4-openssl-dev libssl-dev gcc-5 g++-5 wget libnvidia-gl-390 nvidia-kernel-source-390 \
vim nvidia-headless-no-dkms-390 linux-headers-generic libjansson-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# cuda shit
RUN add-apt-repository -y ppa:graphics-drivers/ppa && apt update && \
ubuntu-drivers autoinstall && apt-get -y install nvidia-cuda-toolkit
# configure gcc5 as default
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1
# create code directory, enter code directory, configure & compile
RUN mkdir -p /opt/code/; cd /opt/code; git clone ${GIT_URL} ${GIT_PROJECT} && \
cd ${GIT_PROJECT} && git checkout ${GIT_BRANCH} && cd compat && git clone https://github.com/peters/curl-for-windows.git && cd .. && \
./autogen.sh && ./configure --with-curl --with-crypto CFLAGS="-march=native" && make clean && make -j$(nproc) && cd /opt/code/${GIT_PROJECT} && \
make install && \
rm -rf /opt/code/
# no parameters display help
ENTRYPOINT ["/usr/local/bin/ccminer"]
CMD ["-h"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment