-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
50 lines (41 loc) · 1.12 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
ARG CUDAVERSION=11.4.0
# Build layer
FROM nvidia/cuda:${CUDAVERSION}-devel-ubuntu18.04 as builder
# install required packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
build-essential \
cmake \
automake \
libtool \
autoconf \
wget \
libgl-dev
# build the kawpow binary
RUN git clone https://github.com/RavenCommunity/kawpowminer.git
RUN cd kawpowminer && \
git submodule update --init --recursive && \
mkdir build && \
cd build && \
cmake .. -DETHASHCUDA=ON -DETHASHCL=ON -DAPICORE=ON
WORKDIR /kawpowminer/build
RUN make -sj $(nproc)
# Runtime layer
FROM nvidia/cuda:${CUDAVERSION}-runtime-ubuntu18.04
# get the binaries from the previous layer
COPY --from=builder /kawpowminer/build /kawpowminer/build
# Set some defaults
ENV PATH=/kawpowminer/build/kawpowminer:$PATH
ENV SCHEME='stratum+tcp'
ENV POOL=kawpow.auto.nicehash.com
ENV PORT=9200
ENV RIGNAME=worker
# add a non-root user
RUN useradd -ms /bin/bash kawpowminer
USER kawpowminer
WORKDIR /home/kawpowminer
# get entrypoint script
COPY kawpow.sh .
# set entrypoint
ENTRYPOINT ["bash","kawpow.sh"]