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

arcade linux build #5423

Merged
merged 2 commits into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

"$DIR/run.sh" build "$@"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please explain why this was necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, when I test on WSL and docker, I got permission error to run eng/common/build.sh, not sure if that will also happen on CI so I add it anyway.


In reply to: 501871675 [](ancestors = 501871675)

Copy link
Contributor

Choose a reason for hiding this comment

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

But is this still necessary if you run this once from a linux environment and check the updated file in?
Since the rest of Arcade doesn't have this, I am wondering if you just need to do it only once.

Also, why did we need to replace run.sh line with a direct call to eng/common/build.sh?


In reply to: 501875979 [](ancestors = 501875979,501871675)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right. Seems git will also track file execute permission and we can check in the file permission change. At first I'm not able to see any change in file content in eng/common/build.sh after change this file's execute permission so I undo the change, I just tried "git diff" and it shows the permission change like below:

diff --git a/eng/common/build.sh b/eng/common/build.sh
old mode 100644
new mode 100755

run.sh is using the old build tools to build the project so I replaced with eng/common/build.sh which will build ML.NET with arcade just like what you did for windows build.


In reply to: 501886537 [](ancestors = 501886537,501875979,501871675)

Copy link
Contributor

Choose a reason for hiding this comment

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

If run.sh is pointing to the old build tools, can we delete it? (And run.cmd?)


In reply to: 501910887 [](ancestors = 501910887,501886537,501875979,501871675)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, there are lots of build related files we can delete from old build tools. I'm thinking we can do a clean up at the end of our arcade work if case we need something or reference something from old build tools.


In reply to: 501919713 [](ancestors = 501919713,501910887,501886537,501875979,501871675)

Copy link
Contributor

Choose a reason for hiding this comment

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

Let us clean up as we along.


In reply to: 501935956 [](ancestors = 501935956,501919713,501910887,501886537,501875979,501871675)

"$DIR/eng/common/build.sh" --restore --build --pack --warnAsError false
Empty file modified eng/common/build.sh
100644 → 100755
Empty file.
Empty file modified eng/common/dotnet-install.sh
100644 → 100755
Empty file.
10 changes: 6 additions & 4 deletions src/Native/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ RootRepo="$DIR/../.."
__build_arch=
__strip_argument=
__configuration=Debug
__rootBinPath="$RootRepo/bin"
__baseIntermediateOutputPath="$__rootBinPath/obj"
__rootBinPath="$RootRepo/artifacts/bin"
__baseIntermediateOutputPath="$RootRepo/artifacts/obj"
__versionSourceFile="$__baseIntermediateOutputPath/version.c"
__mkllibpath=""
__mkllibrpath=""
Expand Down Expand Up @@ -65,12 +65,14 @@ done

__cmake_defines="-DCMAKE_BUILD_TYPE=${__configuration} ${__strip_argument} -DMKL_LIB_PATH=${__mkllibpath} -DMKL_LIB_RPATH=${__mkllibrpath}"

__IntermediatesDir="$__baseIntermediateOutputPath/$__build_arch.$__configuration/Native"
__BinDir="$__rootBinPath/$__build_arch.$__configuration/Native"
__IntermediatesDir="$__baseIntermediateOutputPath/Native/$__build_arch.$__configuration"
__BinDir="$__rootBinPath/Native/$__build_arch.$__configuration"

mkdir -p "$__BinDir"
mkdir -p "$__IntermediatesDir"

export __IntermediatesDir=$__IntermediatesDir

# Set up the environment to be used for building with clang.
if command -v "clang-3.5" > /dev/null 2>&1; then
export CC="$(command -v clang-3.5)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

<ItemGroup>
<ModelFiles Include="$(ModelPlacementDir)\AlexNetPrepOnnx\AlexNetPreprocess.onnx"
Url="https://aka.ms/mlnet-resources/image/AlexNetPrepOnnx/AlexNetPreprocess.onnx "
Url="https://aka.ms/mlnet-resources/image/AlexNetPrepOnnx/AlexNetPreprocess.onnx"
DestinationFile="$(ModelPlacementDir)\AlexNetPrepOnnx\AlexNetPreprocess.onnx"
Copy link
Contributor

Choose a reason for hiding this comment

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

Was the space causing a problem in Linux only?

Copy link
Contributor Author

@frank-dong-ms-zz frank-dong-ms-zz Oct 8, 2020

Choose a reason for hiding this comment

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

I haven't try on mac but this cause download failure on Linux not on Windows.
With old build tools this is fine with Linux as well so this might happens because arcade use different/newer version of msbuild I guess but removing extra space should let download work for all cases.


In reply to: 501872554 [](ancestors = 501872554)

DestinationDir="$(ModelPlacementDir)\AlexNetPrepOnnx" />
</ItemGroup>

<ItemGroup>
<ModelFiles Include="$(ModelPlacementDir)\ResNetPrepOnnx\ResNetPreprocess.onnx"
Url="https://aka.ms/mlnet-resources/image/ResNetPrepOnnx/ResNetPreprocess.onnx "
Url="https://aka.ms/mlnet-resources/image/ResNetPrepOnnx/ResNetPreprocess.onnx"
DestinationFile="$(ModelPlacementDir)\ResNetPrepOnnx\ResNetPreprocess.onnx"
DestinationDir="$(ModelPlacementDir)\ResNetPrepOnnx" />
</ItemGroup>
Expand Down