-
Notifications
You must be signed in to change notification settings - Fork 6.8k
CI: unify centos7_base.sh and centos7_core.sh #18093
Conversation
Hey @leezu , Thanks for submitting the PR
CI supported jobs: [website, clang, miscellaneous, windows-gpu, sanity, edge, unix-gpu, centos-gpu, centos-cpu, windows-cpu, unix-cpu] Note: |
@mxnet-bot run ci [unix-gpu] |
Jenkins CI successfully triggered : [unix-gpu] |
@mxnet-bot run ci [unix-gpu] np truedivide |
Jenkins CI successfully triggered : [unix-gpu] |
@mxnet-bot run ci [unix-gpu] |
Jenkins CI successfully triggered : [unix-gpu] |
1d4434c
to
c234074
Compare
These images are used for testing the static builds. The idea is to have as few system packages present as possible to catch potential dependency issues in our release artifacts.
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.
Please avoid having instructions directly inside the docker files. Instead, follow the same pattern of she'll scripts.
I know the usual way is to do it Inline, but I'd appreciate if we could keep the same style here.
@marcoabreu The current style is broken. We need to get rid of it and replace it with a better style. Let me elaborate. This practice of copying shell files into the container leads to constant docker cache invalidation and makes for a horrible development experience. We need to reconsider this strategy and find a better solution that actually works. Just try generating a docker image locally. It will never rely on the mxnetci docker cache. You can check a number of references about this problem
That's problem Nr 1 with copying shell scripts. It may be possible to workaround by Each of our docker containers has a certain purpose, such as providing a build setup, providing a setup with cuda drivers, providing a minimal setup for testing of release artifacts etc. For each purpose we like to ensure / test it on a variety of platforms (CentOS7 and some newer Ubuntu distro for build; various older and newer Linux distros for testing release artifacts). This leads to a combinatorial number of Dockerfiles. The shell scripts are used to avoid duplicating the same install steps in each Dockerfile. But as the shell scripts are separate from the Dockerfiles they are used in, people get confused easily about which script is used for which purpose; some duplication occurs or some unnecessary dependencies are installed. The problem here is, that there is a disconnect between the content of each shell script and the places of use that finally leads to a hard to understand "mess". Looking at https://github.com/apache/incubator-mxnet/tree/37dbbd4/ci/docker/install it's not really easy to understand for any newcomer. I suggest to firstly simplify the Dockerfiles. As you see in this PR, at least some of the shell scripts install way to many dependencies for the Dockerfiles in which they are included. Other shell scripts can be completely removed by switching from Ubuntu 16.04 base image to 20.04 base image and using system dependencies instead of compiling stuff from source (we can use a very recent version of Ubuntu, because we already ensure compatibility with old distros based on CentOS7). This allows us to greatly simplify each Dockerfile. Secondly, instead of having a separate Dockerfile for every particular setting ( Together, this will greatly simplify our setup and greatly improve the developer experience by fixing the cache and will avoid the need for the shell scripts. This PR doesn't implement it yet obviously, but is a first step. |
@mxnet-bot run ci [unix-gpu, windows-gpu] |
Jenkins CI successfully triggered : [windows-gpu, unix-gpu] |
* CI: Unify centos7_base.sh and centos7_core.sh (delete centos7_base.sh) * Simplify centos7.publish.test Dockerfiles used for testing binary artifacts publish.test Dockerfiles should have as few system packages present as possible to catch potential dependency issues in release artifacts.
Description
Unifying the files is a mechanism to ensure the same system dependencies are used on CI and CD. For example, previously
openblas-devel
was missing on CD.