2021-04-27 14:28:57 +00:00
|
|
|
ARG GO_VERSION=1.16.3
|
2020-07-09 13:57:18 +00:00
|
|
|
|
|
|
|
FROM golang:${GO_VERSION}-buster as downloader
|
|
|
|
|
|
|
|
## Fetch the proof parameters.
|
|
|
|
## 1. Install the paramfetch binary first, so it can be cached over builds.
|
|
|
|
## 2. Then copy over the parameters (which could change).
|
|
|
|
## 3. Trigger the download.
|
|
|
|
## Output will be in /var/tmp/filecoin-proof-parameters.
|
|
|
|
|
2021-04-27 14:28:57 +00:00
|
|
|
RUN go get github.com/filecoin-project/go-paramfetch/paramfetch@master
|
2020-07-09 13:57:18 +00:00
|
|
|
COPY /proof-parameters.json /
|
2020-12-07 13:05:53 +00:00
|
|
|
RUN paramfetch 8388608 /proof-parameters.json
|
2020-07-09 13:57:18 +00:00
|
|
|
|
2021-04-27 14:28:57 +00:00
|
|
|
ARG LOTUS_COMMIT=7e25a811c3d80ea3e007a54aa1da089985110c2c
|
2020-07-27 11:57:01 +00:00
|
|
|
|
2020-07-09 13:57:18 +00:00
|
|
|
## for debug purposes
|
2020-12-07 13:05:53 +00:00
|
|
|
RUN apt update && apt install -y mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config libhwloc-dev curl && git clone https://github.com/filecoin-project/lotus.git && cd lotus/ && git checkout ${LOTUS_COMMIT} && make clean && make all && make install
|
2020-07-09 13:57:18 +00:00
|
|
|
|
|
|
|
FROM ubuntu:18.04
|
|
|
|
|
2020-12-07 13:05:53 +00:00
|
|
|
RUN apt-get update && apt-get install -y ca-certificates llvm clang mesa-opencl-icd ocl-icd-opencl-dev jq gcc pkg-config libhwloc-dev net-tools netcat traceroute iputils-ping wget vim curl telnet iproute2 dnsutils
|
2020-07-09 13:57:18 +00:00
|
|
|
COPY --from=downloader /var/tmp/filecoin-proof-parameters /var/tmp/filecoin-proof-parameters
|
|
|
|
|
|
|
|
## for debug purposes
|
|
|
|
COPY --from=downloader /usr/local/bin/lotus /usr/local/bin/lll
|
2020-07-27 11:57:01 +00:00
|
|
|
COPY --from=downloader /usr/local/bin/lotus-miner /usr/local/bin/lm
|
2020-07-09 13:57:18 +00:00
|
|
|
|
2020-12-07 13:05:53 +00:00
|
|
|
ENV FULLNODE_API_INFO="/ip4/127.0.0.1/tcp/1234/http"
|
|
|
|
ENV MINER_API_INFO="/ip4/127.0.0.1/tcp/2345/http"
|