|
| 1 | +# The CUDA version matters to some degree, and must at least work with the |
| 2 | +# driver used in the container host. |
| 3 | +ARG BASE_CUDA_DEV_CONTAINER=nvidia/cuda:11.6.2-devel-ubuntu20.04 |
| 4 | +ARG BASE_CUDA_RUN_CONTAINER=nvidia/cuda:11.6.2-runtime-ubuntu20.04 |
| 5 | + |
| 6 | +FROM $BASE_CUDA_DEV_CONTAINER as build |
| 7 | + |
| 8 | +# Bring in source |
| 9 | +WORKDIR /vanitygen-plusplus |
| 10 | +COPY . /vanitygen-plusplus |
| 11 | + |
| 12 | +# Build Requirements |
| 13 | +# |
| 14 | +# NOTE(canardleteer): I didn't have any luck getting `make test` to work, so |
| 15 | +# have omitted `check`. |
| 16 | +ENV DEBIAN_FRONTEND=noninteractive |
| 17 | +RUN apt update && \ |
| 18 | + apt install -y make gcc libssl-dev libpcre3-dev libcurl4-openssl-dev nvidia-opencl-dev && \ |
| 19 | + rm -rf /var/lib/apt/lists/* |
| 20 | + |
| 21 | +# NOTE(canardleteer): `make install` target wanted. |
| 22 | +RUN make all |
| 23 | + |
| 24 | +# The runtime image is approximately half the size of the `build` image. |
| 25 | +FROM $BASE_CUDA_RUN_CONTAINER |
| 26 | + |
| 27 | +# NOTE(canardleteer): `libcurl4` is needed by oclvanityminer. I'd like to use |
| 28 | +# something smaller than `nvidia-opencl-dev` if anyone has |
| 29 | +# any suggestions. |
| 30 | +RUN apt update && apt install -y libcurl4 nvidia-opencl-dev && rm -rf /var/lib/apt/lists/* |
| 31 | + |
| 32 | +COPY --from=build /vanitygen-plusplus/oclvanitygen++ /usr/bin |
| 33 | +COPY --from=build /vanitygen-plusplus/oclvanityminer /usr/bin |
| 34 | +COPY --from=build /vanitygen-plusplus/vanitygen++ /usr/bin |
| 35 | +COPY --from=build /vanitygen-plusplus/keyconv /usr/bin |
| 36 | +COPY --from=build /vanitygen-plusplus/calc_addrs.cl . |
| 37 | +COPY --from=build /vanitygen-plusplus/base58prefix.txt . |
| 38 | + |
| 39 | +# The other binaries are available by setting `--entrypoint` upon a `docker run`. |
| 40 | +ENTRYPOINT ["/usr/bin/oclvanitygen++"] |
| 41 | + |
0 commit comments