forked from JeanLucPons/VanitySearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ccap-2.0.Dockerfile
46 lines (37 loc) · 1.09 KB
/
ccap-2.0.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
# Multistage docker build, requires docker 17.05
# CUDA SDK version, and also a prefix of images' tag.
# Check out the list of officially supported tags:
# https://gitlab.com/nvidia/container-images/cuda/blob/master/doc/supported-tags.md
# Format: x.y, e.g.: "10.2".
# Required argument.
ARG CUDA
# builder stage
FROM nvidia/cuda:${CUDA}-devel as builder
# Install newer version of g++ than what Ubuntu 16.04 provides.
RUN apt-get update && \
apt-get install -y --no-install-recommends \
software-properties-common \
&& \
add-apt-repository ppa:ubuntu-toolchain-r/test && \
apt-get update && \
apt-get install -y --no-install-recommends \
g++-7 \
&& \
rm -rf /var/lib/apt/lists/*
COPY . /app
# CUDA Computational Capability.
# Format: x.y, e.g.: "5.2".
# Required argument.
ARG CCAP
RUN cd /app && \
make \
CXX=/usr/bin/g++-7 \
CUDA=/usr/local/cuda \
CXXCUDA=/usr/bin/g++ \
gpu=1 \
"CCAP=${CCAP}" \
all
# runtime stage
FROM nvidia/cuda:${CUDA}-runtime
COPY --from=builder /app/VanitySearch /usr/bin/VanitySearch
ENTRYPOINT ["/usr/bin/VanitySearch"]