Skip to content

Commit

Permalink
fix(ci): rust build issues in lotus devnet dockerfile (#4327)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanabi1224 authored May 15, 2024
1 parent 0c74df9 commit 500f7a1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/devnet/lotus.dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
# Lotus binaries image, to be used in the local devnet with Forest.
FROM golang:1.21-bullseye AS lotus-builder

RUN apt-get update && apt-get install -y ca-certificates build-essential clang ocl-icd-opencl-dev ocl-icd-libopencl1 jq libhwloc-dev
RUN apt-get update && apt-get install -y curl ca-certificates build-essential clang ocl-icd-opencl-dev ocl-icd-libopencl1 jq libhwloc-dev

WORKDIR /lotus

# Install rust toolchain for rebuilding `filecoin-ffi`
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path --profile minimal

ENV PATH="/root/.cargo/bin:${PATH}"

RUN git clone --depth 1 --branch v1.26.1 https://github.com/filecoin-project/lotus.git .

# https://github.com/Filecoin-project/filecoin-ffi?tab=readme-ov-file#building-from-source
RUN CGO_CFLAGS_ALLOW="-D__BLST_PORTABLE__" \
CGO_CFLAGS="-D__BLST_PORTABLE__" \
FFI_USE_BLST_PORTABLE="1" \
FFI_USE_GPU="0" \
make 2k && strip lotus*

FROM ubuntu:22.04
Expand Down

0 comments on commit 500f7a1

Please sign in to comment.