26 lines
922 B
Docker
26 lines
922 B
Docker
|
ARG GO_VERSION=1.14.2
|
||
|
|
||
|
ARG RUNTIME_IMAGE=ubuntu:18.04
|
||
|
|
||
|
FROM golang:${GO_VERSION}-buster AS builder
|
||
|
|
||
|
RUN apt-get update && apt-get install -y ca-certificates llvm clang mesa-opencl-icd ocl-icd-opencl-dev jq gcc git bzr pkg-config
|
||
|
|
||
|
ARG LOTUS_VERSION
|
||
|
|
||
|
RUN git clone https://github.com/filecoin-project/lotus.git /lotus && cd /lotus && git checkout ${LOTUS_VERSION} && git submodule update --init && make 2k
|
||
|
|
||
|
RUN cd /lotus/extern/filecoin-ffi \
|
||
|
&& make \
|
||
|
&& mkdir /tmp/filecoin-ffi \
|
||
|
&& cp -R /lotus/extern/filecoin-ffi /tmp
|
||
|
|
||
|
RUN /lotus/lotus fetch-params 2048
|
||
|
|
||
|
FROM ${RUNTIME_IMAGE} AS binary
|
||
|
|
||
|
COPY --from=builder /var/tmp/filecoin-proof-parameters/* /var/tmp/filecoin-proof-parameters/
|
||
|
COPY --from=builder /lotus/build/bootstrap/* /lotus/build/bootstrap/
|
||
|
COPY --from=builder /lotus/build/proof-params/* /lotus/build/proof-params/
|
||
|
COPY --from=builder /usr/lib/x86_64-linux-gnu/* /lib/x86_64-linux-gnu/* /usr/lib/
|