Skip to content

Commit 3979e3a

Browse files
committed
Switched from /bin/linux to /bin/[ubuntu|debian|etc]
1 parent 7afa126 commit 3979e3a

File tree

4 files changed

+31
-27
lines changed

4 files changed

+31
-27
lines changed

.vscode/launch.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,13 @@
259259
},
260260
"name": "Object Detect YOLOv5 6.2",
261261
"type": "debugpy",
262-
"python": "${workspaceFolder}/runtimes/bin/linux/python38/venv/bin/python",
262+
"python": "${workspaceFolder}/runtimes/bin/windows/python37/venv/Scripts/python",
263263
"windows": {
264264
"python": "${workspaceFolder}/runtimes/bin/windows/python37/venv/Scripts/python"
265265
},
266266
"linux": {
267-
"python": "${workspaceFolder}/runtimes/bin/linux/python38/venv/bin/python",
267+
"python": "${workspaceFolder}/runtimes/bin/ubuntu/python38/venv/bin/python",
268+
// "python": "${workspaceFolder}/runtimes/bin/debian/python38/venv/bin/python",
268269
},
269270
"osx": {
270271
"python": "${workspaceFolder}/runtimes/bin/macos/python38/venv/bin/python",
@@ -501,7 +502,8 @@
501502
"python": "${workspaceFolder}/runtimes/bin/windows/python39/venv/Scripts/python.exe"
502503
},
503504
"linux": {
504-
"python": "${workspaceFolder}/runtimes/bin/linux/python38/venv/bin/python",
505+
"python": "${workspaceFolder}/runtimes/bin/ubuntu/python38/venv/bin/python",
506+
// "python": "${workspaceFolder}/runtimes/bin/debian/python38/venv/bin/python",
505507
},
506508
"osx": {
507509
"python": "${workspaceFolder}/runtimes/bin/macos/python38/venv/bin/python",
@@ -528,12 +530,13 @@
528530

529531
"name": "Python Simple Module",
530532
"type": "debugpy",
531-
"python": "${workspaceFolder}/runtimes/bin/linux/python39/venv/bin/python",
533+
"python": "${workspaceFolder}/runtimes/bin/windows/python39/venv/Scripts/python",
532534
"windows": {
533535
"python": "${workspaceFolder}/runtimes/bin/windows/python39/venv/Scripts/python"
534536
},
535537
"linux": {
536-
"python": "${workspaceFolder}/runtimes/bin/linux/python38/venv/bin/python",
538+
"python": "${workspaceFolder}/runtimes/bin/ubuntu/python38/venv/bin/python",
539+
// "python": "${workspaceFolder}/runtimes/bin/debian/python38/venv/bin/python",
537540
},
538541
"osx": {
539542
"python": "${workspaceFolder}/runtimes/bin/macos/python38/venv/bin/python",
@@ -563,12 +566,13 @@
563566

564567
"name": "Python Long Process Module",
565568
"type": "debugpy",
566-
"python": "${workspaceFolder}/runtimes/bin/linux/python39/venv/bin/python",
569+
"python": "${workspaceFolder}/runtimes/bin/windows/python39/venv/Scripts/python",
567570
"windows": {
568571
"python": "${workspaceFolder}/runtimes/bin/windows/python39/venv/Scripts/python"
569572
},
570573
"linux": {
571-
"python": "${workspaceFolder}/runtimes/bin/linux/python38/venv/bin/python",
574+
"python": "${workspaceFolder}/runtimes/bin/ubuntu/python38/venv/bin/python",
575+
// "python": "${workspaceFolder}/runtimes/bin/debian/python38/venv/bin/python",
572576
},
573577
"osx": {
574578
"python": "${workspaceFolder}/runtimes/bin/macos/python38/venv/bin/python",

devops/install/clean.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -424,20 +424,20 @@ if [ "$cleanInstallCurrentOS" = true ]; then
424424
writeLine
425425

426426
# Clean shared python venvs
427-
removeDir "${rootDir}/runtimes/bin/${os}/"
427+
removeDir "${rootDir}/runtimes/bin/${platform_dir}/"
428428

429429
# Clean module python venvs
430430
for dirName in "${pythonModules[@]}"
431431
do
432-
removeDir "${rootDir}/modules/${dirName}/bin/${os}/"
432+
removeDir "${rootDir}/modules/${dirName}/bin/${platform_dir}/"
433433
done
434434
for dirName in "${pythonExternalModules[@]}"
435435
do
436-
removeDir "${externalModulesDir}/${dirName}/bin/${os}/"
436+
removeDir "${externalModulesDir}/${dirName}/bin/${platform_dir}/"
437437
done
438438
for dirName in "${pythonDemoModules[@]}"
439439
do
440-
removeDir "${rootDir}/src/demos/modules/${dirName}/bin/${os}/"
440+
removeDir "${rootDir}/src/demos/modules/${dirName}/bin/${platform_dir}/"
441441
done
442442
fi
443443

@@ -472,20 +472,20 @@ if [ "$cleanLibraries" = true ]; then
472472
writeLine
473473

474474
# Clean shared python venvs
475-
delPattern "${rootDir}/runtimes/bin/${os}/python*/venv/lib/python*/site-packages/*"
475+
delPattern "${rootDir}/runtimes/bin/${platform_dir}/python*/venv/lib/python*/site-packages/*"
476476

477477
# Clean module python venvs
478478
for dirName in "${pythonModules[@]}"
479479
do
480-
delPattern "${rootDir}/modules/${dirName}/bin/${os}/python*/venv/lib/python*/site-packages/*"
480+
delPattern "${rootDir}/modules/${dirName}/bin/${platform_dir}/python*/venv/lib/python*/site-packages/*"
481481
done
482482
for dirName in "${pythonExternalModules[@]}"
483483
do
484-
delPattern "${externalModulesDir}/${dirName}/bin/${os}/python*/venv/lib/python*/site-packages/*"
484+
delPattern "${externalModulesDir}/${dirName}/bin/${platform_dir}/python*/venv/lib/python*/site-packages/*"
485485
done
486486
for dirName in "${pythonDemoModules[@]}"
487487
do
488-
delPattern "${rootDir}/src/demos/modules/${dirName}/bin/${os}/python*/venv/lib/python*/site-packages/*"
488+
delPattern "${rootDir}/src/demos/modules/${dirName}/bin/${platform_dir}/python*/venv/lib/python*/site-packages/*"
489489
done
490490
fi
491491

src/scripts/utils.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,8 +1190,8 @@ function setupPython () {
11901190

11911191
# Download
11921192
cd "${downloadDirPath}"
1193-
mkdir --parents "${os}/Lib" >/dev/null
1194-
cd "${os}/Lib"
1193+
mkdir --parents "${platform_dir}/lib" >/dev/null
1194+
cd "${os}/lib"
11951195

11961196
if [ ! -f "openssl-1.1.1c.tar.gz" ]; then
11971197
curl $curlFlags --remote-name https://www.openssl.org/source/openssl-1.1.1c.tar.gz
@@ -2836,7 +2836,7 @@ if [[ $OSTYPE == 'darwin'* ]]; then
28362836
os="macos"
28372837
os_name=$(awk '/SOFTWARE LICENSE AGREEMENT FOR macOS/' '/System/Library/CoreServices/Setup Assistant.app/Contents/Resources/en.lproj/OSXSoftwareLicense.rtf' | awk -F 'macOS ' '{print $NF}' | awk '{print substr($0, 0, length($0)-1)}') # eg "Big Sur"
28382838
os_vers=$(sw_vers -productVersion) # eg "11.1" for macOS Big Sur
2839-
2839+
platform_dir=$platform # or platform_dir="${platform// /}""; platform_dir="${platform_dir,,}" - no space, lowercase
28402840
systemName=$os
28412841
edgeDevice=''
28422842

@@ -2845,8 +2845,9 @@ else
28452845
os='linux'
28462846
edgeDevice=''
28472847
platform='linux'
2848-
os_name=$(. /etc/os-release;echo $ID) # eg "ubuntu", "debian12"
2848+
os_name=$(. /etc/os-release;echo $ID) # eg "ubuntu", "debian"
28492849
os_vers=$(. /etc/os-release;echo $VERSION_ID) # eg "22.04" for Ubuntu 22.04, "12" for Debian 12
2850+
platform_dir=$os_name # or $platform
28502851

28512852
if [ "$architecture" = 'arm64' ]; then platform='linux-arm64'; fi
28522853

src/setup.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@
6262
# verbosity can be: quiet | info | loud. Use --verbosity quiet|info|loud
6363
verbosity="quiet"
6464

65-
# The .NET version to install. NOTE: Only major version matters unless we use manual install
66-
# scripts, in which case we need to specify version. Choose version that works for all platforms
67-
# since the versions of these are not in always in sync
65+
# The .NET version to install. NOTE: Only major version matters unless we use
66+
# manual install scripts, in which case we need to specify the version. Choose a
67+
# version that works for all platforms since the SDK and runtime versions are
68+
# generally not the same (usually differences in the minor or patch version)
6869
dotNetTarget=net9.0
6970
dotNetRuntimeVersion=9.0.0
7071
dotNetSDKVersion=9.0.100
@@ -170,9 +171,6 @@ assetsDir='assets'
170171
# not currently used, but here for future-proofing
171172
modelsDir="models"
172173

173-
# The location of directories relative to the root of the solution directory
174-
sdkPath="${rootDirPath}/SDK"
175-
176174
# Who launched this script? user or server?
177175
launchedBy="user"
178176

@@ -311,6 +309,7 @@ externalModulesDirPath="${rootDirPath}/../${externalModulesDir}"
311309
modelsDirPath="${rootDirPath}/${modelsDir}"
312310
downloadDirPath="${rootDirPath}/${downloadDir}"
313311
downloadModuleAssetsDirPath="${downloadDirPath}/${modulesDir}/${assetsDir}"
312+
sdkPath="${appRootDirPath}/SDK"
314313
utilsScriptsDirPath="${appRootDirPath}/scripts"
315314
installScriptsDirPath="${rootDirPath}/devops/install"
316315
utilsScript="${utilsScriptsDirPath}/utils.sh"
@@ -357,9 +356,9 @@ function setupPythonPaths () {
357356
# The path to the python installation, either local or shared. The
358357
# virtual environment will live in here
359358
if [ "${runtimeLocation}" = "Local" ]; then
360-
pythonDirPath="${moduleDirPath}/bin/${os}/${pythonName}"
359+
pythonDirPath="${moduleDirPath}/bin/${platform_dir}/${pythonName}"
361360
else
362-
pythonDirPath="${runtimesDirPath}/bin/${os}/${pythonName}"
361+
pythonDirPath="${runtimesDirPath}/bin/${platform_dir}/${pythonName}"
363362
fi
364363
virtualEnvDirPath="${pythonDirPath}/venv"
365364

0 commit comments

Comments
 (0)