Skip to content

Commit 5d463a8

Browse files
committed
Install fixes for Ubuntu
1 parent 7125af4 commit 5d463a8

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

modules/ObjectDetectionYOLOv5Net/ObjectDetectionYOLOv5Net.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,12 @@
8181

8282
<ItemGroup>
8383
<PackageReference Include="CodeProject.AI.Module.SDK" Version="1.0.1" />
84-
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='CPU'" />
85-
<PackageReference Include="Microsoft.ML.OnnxRuntime.Gpu" Version="1.16.3" Condition="'$(GpuType)'=='CUDA'" />
84+
85+
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='CPU'" />
86+
<PackageReference Include="Microsoft.ML.OnnxRuntime.Gpu" Version="1.19.2" Condition="'$(GpuType)'=='CUDA'" />
8687
<PackageReference Include="Microsoft.ML.OnnxRuntime.OpenVino" Version="1.13.1-dev-20221026-1209-861125ccb" Condition="'$(GpuType)'=='OpenVINO'" />
8788
<PackageReference Include="Microsoft.ML.OnnxRuntime.DirectML" Version="1.19.2" Condition="'$(GpuType)'=='DirectML'" />
88-
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='MPS'" />
89+
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='MPS'" />
8990

9091
<!-- https://github.com/microsoft/onnxruntime/issues/12677#issuecomment-1443802719 -->
9192
<PackageReference Include="Microsoft.AI.DirectML" Version="1.15.2" Condition="'$(GpuType)'=='DirectML'" />

src/demos/modules/DotNetSimple/DotNetSimple.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@
6060
<!-- Hardware Specific packages. Note that for CUDA, even if there may not be any actual
6161
CUDA hardware available, the package will still run fine. It's big, but if it does
6262
find CUDA on the machine then it's worth it. -->
63-
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='CPU'" />
64-
<PackageReference Include="Microsoft.ML.OnnxRuntime.Gpu" Version="1.16.3" Condition="'$(GpuType)'=='CUDA'" />
65-
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='MPS'" />
63+
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='CPU'" />
64+
<PackageReference Include="Microsoft.ML.OnnxRuntime.Gpu" Version="1.19.2" Condition="'$(GpuType)'=='CUDA'" />
65+
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.16.3" Condition="'$(GpuType)'=='MPS'" />
6666
<PackageReference Include="Microsoft.ML.OnnxRuntime.DirectML" Version="1.19.2" Condition="'$(GpuType)'=='DirectML'" />
6767
<!-- https://github.com/microsoft/onnxruntime/issues/12677#issuecomment-1443802719 -->
68-
<PackageReference Include="Microsoft.AI.DirectML" Version="1.15.2" Condition="'$(GpuType)'=='DirectML'" />
68+
<PackageReference Include="Microsoft.AI.DirectML" Version="1.15.2" Condition="'$(GpuType)'=='DirectML'" />
6969

7070
</ItemGroup>
7171

src/setup.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ function doModuleInstall () {
518518
writeLine "Installing Python ${pythonVersion}"
519519
setupPython
520520
if [ $? -gt 0 ]; then moduleInstallErrors="Unable to install Python ${pythonVersion}"; fi
521-
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - ${moduleInstallErrors}\n"; fi
521+
# if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - ${moduleInstallErrors}\n"; fi
522522
fi
523523

524524
# Install the module, but only if there were no issues installing python
@@ -529,7 +529,7 @@ function doModuleInstall () {
529529
source "${moduleDirPath}/install.sh" "install"
530530
if [ $? -gt 0 ] && [ "${moduleInstallErrors}" = "" ]; then moduleInstallErrors="failed to install"; fi
531531

532-
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [${moduleName}] ${moduleInstallErrors}\n"; fi
532+
# if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [${moduleName}] ${moduleInstallErrors}\n"; fi
533533
fi
534534

535535
# If a python version has been specified then we'll automatically look
@@ -547,7 +547,7 @@ function doModuleInstall () {
547547

548548
installRequiredPythonPackages
549549
if [ $? -gt 0 ]; then moduleInstallErrors="Unable to install Python packages"; fi
550-
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [${moduleName}] ${moduleInstallErrors}\n"; fi
550+
# if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [${moduleName}] ${moduleInstallErrors}\n"; fi
551551

552552
# With the move to having modules include our SDK PyPi, we no longer need this.
553553
# writeLine "Installing Python packages for the CodeProject.AI Server SDK"
@@ -571,7 +571,7 @@ function doModuleInstall () {
571571
source "${moduleDirPath}/post_install.sh" "post-install"
572572
if [ $? -gt 0 ]; then moduleInstallErrors="Error running post-install script"; fi
573573

574-
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [${moduleName}] ${moduleInstallErrors}\n"; fi
574+
# if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [${moduleName}] ${moduleInstallErrors}\n"; fi
575575
fi
576576
fi
577577

@@ -657,7 +657,7 @@ function doModuleInstall () {
657657
fi
658658

659659
# return result
660-
echo "${moduleInstallErrors}"
660+
# echo "${moduleInstallErrors}"
661661
}
662662

663663
# import the utilities :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@@ -704,7 +704,7 @@ if [[ $(wget -h 2>&1 | grep -E 'waitretry|connect-timeout') ]]; then
704704
fi
705705

706706
# pipFlags='--quiet --quiet' - not actually supported, even though docs say it is
707-
pipFlags=''
707+
pipFlags='-q -q -q'
708708
copyFlags='/NFL /NDL /NJH /NJS /nc /ns >/dev/null'
709709
unzipFlags='-o -qq'
710710
tarFlags='-xf'
@@ -1071,7 +1071,7 @@ if [ "$setupMode" = 'SetupEverything' ]; then
10711071

10721072
doModuleInstall "${moduleId}" "${moduleDirPath}" "Internal"
10731073

1074-
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [${moduleId}] ${moduleInstallErrors}\n"; fi
1074+
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [Int: ${moduleId} @ $moduleDirPath] ${moduleInstallErrors}\n"; fi
10751075
done
10761076

10771077
if [ "$installExternalModules" = "true" ]; then
@@ -1088,7 +1088,7 @@ if [ "$setupMode" = 'SetupEverything' ]; then
10881088
moduleId=$(getModuleIdFromModuleSettings "${moduleDirPath}/modulesettings.json")
10891089

10901090
doModuleInstall "${moduleId}" "${moduleDirPath}" "External"
1091-
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [${moduleId}] ${moduleInstallErrors}\n"; fi
1091+
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [Ext: ${moduleId} @ $moduleDirPath] ${moduleInstallErrors}\n"; fi
10921092
done
10931093
else
10941094
writeLine "No external modules found" "$color_mute"
@@ -1133,7 +1133,7 @@ if [ "$setupMode" = 'SetupEverything' ]; then
11331133
moduleId=$(getModuleIdFromModuleSettings "${moduleDirPath}/modulesettings.json")
11341134

11351135
doModuleInstall "${moduleId}" "${moduleDirPath}" "Demo"
1136-
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [${moduleId}] ${moduleInstallErrors}\n"; fi
1136+
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [Demo: ${moduleId} @ $moduleDirPath] ${moduleInstallErrors}\n"; fi
11371137
done
11381138
modulesDirPath="${oldModulesDirPath}"
11391139
fi
@@ -1202,7 +1202,7 @@ else
12021202
moduleId=$(getModuleIdFromModuleSettings "${moduleDirPath}/modulesettings.json")
12031203

12041204
doModuleInstall "${moduleId}" "${moduleDirPath}" "Demo"
1205-
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [${moduleId}] ${moduleInstallErrors}\n"; fi
1205+
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [Demo: ${moduleId}] ${moduleInstallErrors}\n"; fi
12061206

12071207
modulesDirPath="$oldModulesDirPath"
12081208

@@ -1212,15 +1212,15 @@ else
12121212
moduleId=$(getModuleIdFromModuleSettings "${moduleDirPath}/modulesettings.json")
12131213

12141214
doModuleInstall "${moduleId}" "${moduleDirPath}" "External"
1215-
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [${moduleId}] ${moduleInstallErrors}\n"; fi
1215+
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [Ext: ${moduleId}] ${moduleInstallErrors}\n"; fi
12161216

12171217
else # Internal module
12181218

12191219
moduleDirPath="${modulesDirPath}/${moduleDirName}"
12201220
moduleId=$(getModuleIdFromModuleSettings "${moduleDirPath}/modulesettings.json")
12211221

12221222
doModuleInstall "${moduleId}" "${moduleDirPath}" "Internal"
1223-
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [${moduleId}] ${moduleInstallErrors}\n"; fi
1223+
if [ "${moduleInstallErrors}" != "" ]; then setupErrors="${setupErrors}\n - [Int: ${moduleId}] ${moduleInstallErrors}\n"; fi
12241224

12251225
fi
12261226
fi

0 commit comments

Comments
 (0)