Skip to content
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

Merged
merged 3 commits into from
Nov 3, 2020

Conversation

chen-zhiyu
Copy link
Contributor

PR types

New features

PR changes

OPs

Describe

  1. add musl-linux docker files for paddle compiling.
  2. add auto/man build script for paddle with WITH_MUSL option.
  3. add paddl musl building readme doc.

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

- Dockerfile: build docker defination file.

# maintainer
- Chen Zhiyu (quby@sina.com)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不建议留个人信息

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

61行是否可以去掉?

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

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,会在下个版本中尝试合入。

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议用make -j 来加速

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这部分是手动的,用户可以自行选择

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

76行是什么意思呢?同下93行

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shellcheck 会报${var[@]} 展开为多项,这个原意就是要动态增加参数,所以要跳过这个检查

@chen-zhiyu chen-zhiyu requested a review from luotao1 October 16, 2020 13:18
@chenwhql chenwhql requested a review from kolinwei November 3, 2020 05:43
@chenwhql chenwhql merged commit 953302d into PaddlePaddle:develop Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants