1 Star 0 Fork 0

Kevin_Yan/rust-fil-proofs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile-profile 3.52 KB
一键复制 编辑 原始数据 按行查看 历史
porcuquine 提交于 2019-10-09 09:41 . feat: replace ZigZag with Stacked DRG
# How to build and run this Dockerfile:
#
# ```
# RUST_FIL_PROOFS=`pwd` # path to `rust-fil-proofs`
# docker --log-level debug build --progress tty --file Dockerfile-profile --tag rust-cpu-profile .
# docker run -it -v $RUST_FIL_PROOFS:/code/ rust-cpu-profile
# ```
FROM rust
# Get all the dependencies
# ------------------------
# Copied from: github.com/filecoin-project/rust-fil-proofs/blob/master/Dockerfile-ci
RUN apt-get update && \
apt-get install -y curl file gcc g++ git make openssh-client \
autoconf automake cmake libtool libcurl4-openssl-dev libssl-dev \
libelf-dev libdw-dev binutils-dev zlib1g-dev libiberty-dev wget \
xz-utils pkg-config python clang
# `gperftools` and dependencies (`libunwind`)
# -------------------------------------------
ENV GPERFTOOLS_VERSION="2.7"
ENV LIBUNWIND_VERSION="0.99-beta"
ENV HOME="/root"
ENV DOWNLOADS=${HOME}/downloads
RUN mkdir -p ${DOWNLOADS}
RUN echo ${DOWNLOADS}
WORKDIR ${DOWNLOADS}
RUN wget http://download.savannah.gnu.org/releases/libunwind/libunwind-${LIBUNWIND_VERSION}.tar.gz --output-document ${DOWNLOADS}/libunwind-${LIBUNWIND_VERSION}.tar.gz
RUN tar -xvf ${DOWNLOADS}/libunwind-${LIBUNWIND_VERSION}.tar.gz
WORKDIR ${DOWNLOADS}/libunwind-${LIBUNWIND_VERSION}
RUN ./configure
RUN make
RUN make install
WORKDIR ${DOWNLOADS}
RUN wget https://github.com/gperftools/gperftools/releases/download/gperftools-${GPERFTOOLS_VERSION}/gperftools-${GPERFTOOLS_VERSION}.tar.gz --output-document ${DOWNLOADS}/gperftools-${GPERFTOOLS_VERSION}.tar.gz
RUN tar -xvf ${DOWNLOADS}/gperftools-${GPERFTOOLS_VERSION}.tar.gz
WORKDIR ${DOWNLOADS}/gperftools-${GPERFTOOLS_VERSION}
RUN ./configure
RUN make install
WORKDIR ${DOWNLOADS}
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
# FIXME: `gperftools` installs the library (`make install`) in
# `/usr/local/lib` by default but Debian/Ubuntu don't look there
# now, the correct `--prefix` should be added to the command.
# Install latest toolchain used by `rust-fil-proofs`
# --------------------------------------------------
RUN rustup default nightly-2019-07-15
# FIXME: The lastest version used should be dynamically obtained form the `rust-fil-proofs` repo
# and not hard-coded here.
# Ready to run
# ------------
WORKDIR /code
CMD \
cargo update \
&& \
cargo build \
-p filecoin-proofs \
--release \
--example stacked \
--features \
cpu-profile \
-Z package-features \
&& \
RUST_BACKTRACE=full \
RUST_LOG=trace \
target/release/examples/stacked \
--size 1024 \
&& \
pprof target/release/examples/stacked replicate.profile || bash
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kevin_yan/rust-fil-proofs.git
git@gitee.com:kevin_yan/rust-fil-proofs.git
kevin_yan
rust-fil-proofs
rust-fil-proofs
master

搜索帮助