-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Static build instruction for MXNet in general #13914
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,33 @@ | ||||||
# MXNet Publish Settings | ||||||
|
||||||
This folder contains the configuration of restricted node on Jenkins for the publish. It also contains a folder called `scala` that contains everything required for scala publish. In this `README`, we would bring a brief walkthrough of the Jenkins configuration as well as the usages of the scala deployment files. | ||||||
|
||||||
## Jenkins | ||||||
Currently, Jenkins contains three build stages, namely `Build Packages`, `Test Packages` and `Deploy Packages`. During the `build package` stages, all dependencies will be built and a Scala package would be created. In the second stage, the package created from the previous stage would move to this stage to specifically run the tests. In the final stage, the packages passed the test would be deployed by the instances. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
The job is scheduled to be triggered every 24 hours on a [restricted instance](http://jenkins.mxnet-ci.amazon-ml.com/blue/organizations/jenkins/restricted-publish-artifacts). | ||||||
|
||||||
Currently, we are supporting tests in the following systems: | ||||||
|
||||||
- Ubuntu 16.04 | ||||||
- Ubuntu 18.04 | ||||||
- Cent OS 7 | ||||||
|
||||||
All packages are currently built in `Ubuntu 14.04`. All Dockerfile used for publishing are available in `ci/docker/` with prefix `Dockerfile.publish`. | ||||||
|
||||||
Apart from that, the script used to create the environment and publish are available under `ci/docker/install`: | ||||||
|
||||||
- `ubuntu_publish.sh` install all required dependencies for Ubuntu 14.04 for publishing | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- `ubuntu_base.sh` install minimum dependencies required to run the published packages | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
## Scala publish | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
Currently Scala publish on Linux is fully supported on jenkins. The `scala/` folder contains all files needed to do the publish. Here is a breif instroduction of the files: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
- `build.sh` Main executable files to build the backend as well as scala package | ||||||
- `buildkey.py` Main file used to extract password from the system and configure the maven | ||||||
- `deploy.sh` Script to deploy the package | ||||||
- `fullDeploy.sh` Used by CI to make full publish | ||||||
- `test.sh` Make Scala test on CI | ||||||
|
||||||
## Python | ||||||
We plans to support Python build on Jenkins soon | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,32 @@ | ||||||
# MXNet Static build | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
This folder contains the core script used to build the static library. This README would bring you the information and usages of the script in here. Please be aware, all of the scripts are designed to be run under the root folder. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
## `build.sh` | ||||||
This script is a wrapper around `build_lib.sh` aimed to simplify the usage of it. It would automatically identify the system version, number of cores and all environment variable settings. Here are the examples you can run this script: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
``` | ||||||
tools/staticbuild/build.sh cu92 maven | ||||||
``` | ||||||
This would build the mxnet package based on CUDA9.2 and Maven (Scala) build setttings. | ||||||
``` | ||||||
tools/staticbuild/build.sh mkl pip | ||||||
``` | ||||||
This would build the mxnet package based on MKLDNN and and pypi configuration settings. | ||||||
|
||||||
As the result, users would have a complete static dependencies in `/staticdeps` in the root folder as well as a static-linked `libmxnet.so` file lives in `lib`. You can build your language binding by using the `libmxnet.so`. | ||||||
|
||||||
## `build_lib.sh` | ||||||
This script would clone the most up-to-date master and build the MXNet backend with static library. In order to run that, you should have prepare the the following environment variable: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
- `DEPS_PATH` Path to your static dependencies | ||||||
- `STATIC_BUILD_TARGET` Either `pip` or `maven` as your publish platform | ||||||
- `PLATFORM` linux, darwin | ||||||
- `VARIANT` cpu, cu*, cu*mkl, mkl | ||||||
|
||||||
It is not recommended to run this file alone since there are a bunch of variables need to be set. | ||||||
|
||||||
After running this script, you would have everything you need ready in the `/lib` folder. | ||||||
|
||||||
## `build_wheel.sh` | ||||||
This script is used to build the python package as well as running a sanity test | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
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.