-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add musl docker build script #28027
add musl docker build script #28027
Conversation
Thanks for your contribution! |
paddle/scripts/musl_build/README.md
Outdated
- Dockerfile: build docker defination file. | ||
|
||
# maintainer | ||
- Chen Zhiyu (quby@sina.com) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不建议留个人信息
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok我去掉
-DWITH_TESTING=OFF | ||
|
||
echo "compile with make: $" | ||
# shellcheck disable=2068 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
61行是否可以去掉?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
后面$@会报错,这个是给后面加make 参数用的, 比如-j8
pip install -r /paddle/python/requirements.txt | ||
|
||
# configure project with cmake | ||
cmake /paddle -DWITH_MUSL=ON DWITH_CRYPTO=OFF -DWITH_MKL=OFF -DWITH_GPU=OFF -DWITH_TESTING=OFF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MUSL不能和MKL共用么?
-DWITH_TESTING=OFF可以去掉,默认就是OFF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MKL是预编译的so,目前的只有glibc的。intel提供了测试的mkl-musl,会在下个版本中尝试合入。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-DWITH_TESTING=OFF 去掉了
cmake /paddle -DWITH_MUSL=ON DWITH_CRYPTO=OFF -DWITH_MKL=OFF -DWITH_GPU=OFF -DWITH_TESTING=OFF | ||
|
||
# run the make to build project | ||
make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议用make -j 来加速
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这部分是手动的,用户可以自行选择
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
自动部分,在ci脚本上是支持加-j的
OUTPUT_DIR=$(realpath $OUTPUT_DIR) | ||
echo "build output: $OUTPUT_DIR" | ||
|
||
# shellcheck disable=2086,2068 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
76行是什么意思呢?同下93行
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shellcheck 会报${var[@]} 展开为多项,这个原意就是要动态增加参数,所以要跳过这个检查
PR types
New features
PR changes
OPs
Describe