Skip to content

Instantly share code, notes, and snippets.

@yoyololicon
Last active March 26, 2021 01:52
Show Gist options
  • Save yoyololicon/52dd93a4815962e69dc13b69bf17477c to your computer and use it in GitHub Desktop.
Save yoyololicon/52dd93a4815962e69dc13b69bf17477c to your computer and use it in GitHub Desktop.
FROM nvidia/cuda:11.2.1-devel
MAINTAINER Chin-Yun Yu
WORKDIR /
ENV TZ=Asia/Taipei
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Package and dependency setup
RUN apt-get update \
&& apt-get -y install software-properties-common \
&& add-apt-repository -y ppa:ethereum/ethereum -y \
&& apt-get update \
&& apt-get install -y git \
cmake \
ethereum
# Git repo set up
RUN git clone https://github.com/ethereum-mining/ethminer.git; \
cd ethminer; \
git submodule update --init --recursive
# Build
RUN cd ethminer; \
mkdir build; \
cd build; \
cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF -DETHSTRATUM=ON; \
cmake --build .; \
make install;
# Env setup
ENV GPU_FORCE_64BIT_PTR=0
ENV GPU_MAX_HEAP_SIZE=100
ENV GPU_USE_SYNC_OBJECTS=1
ENV GPU_MAX_ALLOC_PERCENT=100
ENV GPU_SINGLE_ALLOC_PERCENT=100
ENTRYPOINT ["/usr/local/bin/ethminer", "-U"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment