R** move cmake installation into env_create.sh#2393
R** move cmake installation into env_create.sh#2393guru-desh wants to merge 2 commits intoapple:mainfrom
Conversation
|
The change looks good. I've kicked off a CI run: https://gitlab.com/coremltools1/coremltools/-/pipelines/1544298967 |
|
Thanks for the CI run! Here's a link to the previous PR that I forgot to link: #2379 In that previous PR, there were some questions that had come up. I will link my response below:
This was a pure refactoring change. In In addition, if
Could you explain what "env-tweaking cases" are? Why can't the env-tweaking cases be done in the |
|
@YifanShenSZ - can respond to the above questions? I think since this change only installs cmake if it isn't already installed, it shouldn't matter which script installs it. |
I would like to clarify this. The change installs |
|
@TobyRoseman any update on this? |
|
I think the documentation changes for this PR are good. I would like to merge those changes. I don't think we should be installing I still don't understand why you want to move the cmake installation out of |
Awesome!
Here's my reasoning:
Would love to hear your reasoning about why to not install
Here's my reasoning: It's mainly due to the Single Responsibility Principle.
With the |
|
Thanks @guru-desh for the detailed explanations. I agree with your second point. If we're going to install However, I still don't think it makes sense to install Please address this issue and rebase on top of latest |
| python -m pip install -e "$COREMLTOOLS_HOME/../coremltools" --upgrade | ||
| fi | ||
|
|
||
| conda install -y cmake |
There was a problem hiding this comment.
Please add the deleted if-statement from build.sh here.
I had a previous PR for this, however, I had made some edits to my fork that closed the pull request and added commits from another feature I was working on. I guess that's a reminder to me to make new branches in git 😄 . Apologies for a duplicate PR. Here's the original description:
This PR simplifies the build setup process by installing
cmakeviaconda.Current Behavior:
In the
build.shscript, this if statement exists:If
cmakedoes not exist on the machine used to buildcoremltools, thencmakewill be installed viaconda.BUILDING.mdstates that the user needs to installcmake. However, if thebuild.sh script already installscmakethen the following refactor can be done:cmakeby default into thecondaenvironmentcmakeoutside of thecoremltoolsbuildNew Behavior:
env_create.shscript installscmakevia theanacondachannel.cmakethemselves)This refactor makes it so that the user no longer needs to install
cmakebefore buildingcoremltools(as the build itself will installcmakeviaconda)Checks
Running
./scripts/build.sh --python=3.8created a working build for me locally, but I'm not sure how to run the GitLab CI job. Could I get some help on that? Thanks in advance 😄