Skip to content

Commit 1371b8a

Browse files
author
Chris Maunder
committed
Merge branch 'main' into v2.9.0
2 parents d855cea + 616fc2b commit 1371b8a

File tree

11 files changed

+124
-36
lines changed

11 files changed

+124
-36
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ We will be constantly expanding the feature list.
120120

121121
#### Supported Development Environments
122122

123-
This current release works best with Visual Studio Code on Windows 10+. Ubuntu, Debian and macOS (both Intel and Apple Silicon). Visual Studio 2019+ support is included for Windows 10+.
123+
This current release works best with Visual Studio Code on Windows 10+. Ubuntu 22.04+, Debian and macOS (both Intel and Apple Silicon). Visual Studio 2019+ support is included for Windows 10+.
124124

125125
The current release provides support for CPU on each platform, DirectML on Windows, CUDA on Windows and Linux, support for Apple Silicon GPUs, RockChip NPUs and Coral.AI TPUs. Support depends on the module itself.
126126

devops/install/dotnet-install-arm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ bold="\e[1m"
55
underline="\e[1;4m"
66
reset="\e[0m"
77

8-
echo -e "${bold}.NET 7 Installer${reset}"
8+
echo -e "${bold}.NET 9 Installer${reset}"
99
echo -e "${bold}Pete Codes / PJG Creations 2021${reset}"
1010
echo -e "${bold}CodeProject.AI edition${reset}" # Drastically trimming output / SDK is optional
1111

devops/install/dotnet-install.sh

Lines changed: 60 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,14 @@ get_machine_architecture() {
329329
echo "loongarch64"
330330
return 0
331331
;;
332+
riscv64)
333+
echo "riscv64"
334+
return 0
335+
;;
336+
powerpc|ppc)
337+
echo "ppc"
338+
return 0
339+
;;
332340
esac
333341
fi
334342

@@ -417,11 +425,17 @@ get_normalized_architecture_for_specific_sdk_version() {
417425
# args:
418426
# version or channel - $1
419427
is_arm64_supported() {
420-
#any channel or version that starts with the specified versions
421-
case "$1" in
422-
( "1"* | "2"* | "3"* | "4"* | "5"*)
423-
echo false
424-
return 0
428+
# Extract the major version by splitting on the dot
429+
major_version="${1%%.*}"
430+
431+
# Check if the major version is a valid number and less than 6
432+
case "$major_version" in
433+
[0-9]*)
434+
if [ "$major_version" -lt 6 ]; then
435+
echo false
436+
return 0
437+
fi
438+
;;
425439
esac
426440

427441
echo true
@@ -571,12 +585,10 @@ is_dotnet_package_installed() {
571585
local dotnet_package_path="$(combine_paths "$(combine_paths "$install_root" "$relative_path_to_package")" "$specific_version")"
572586
say_verbose "is_dotnet_package_installed: dotnet_package_path=$dotnet_package_path"
573587

574-
if [ ! -d "$dotnet_package_path" ]; then
575-
# say_err "$dotnet_package_path does not exist"
576-
return 1
577-
else
578-
# say_err "$dotnet_package_path exists"
588+
if [ -d "$dotnet_package_path" ]; then
579589
return 0
590+
else
591+
return 1
580592
fi
581593
}
582594

@@ -962,6 +974,39 @@ get_absolute_path() {
962974
return 0
963975
}
964976

977+
# args:
978+
# override - $1 (boolean, true or false)
979+
get_cp_options() {
980+
eval $invocation
981+
982+
local override="$1"
983+
local override_switch=""
984+
985+
if [ "$override" = false ]; then
986+
# cp: warning: behavior of -n is non-portable and may change in future; use --update=none instead
987+
# override_switch="-n"
988+
override_switch="--update=none"
989+
990+
# create temporary files to check if 'cp -u' is supported
991+
tmp_dir="$(mktemp -d)"
992+
tmp_file="$tmp_dir/testfile"
993+
tmp_file2="$tmp_dir/testfile2"
994+
995+
touch "$tmp_file"
996+
997+
# use -u instead of -n if it's available
998+
if cp -u "$tmp_file" "$tmp_file2" 2>/dev/null; then
999+
override_switch="-u"
1000+
fi
1001+
1002+
# clean up
1003+
rm -f "$tmp_file" "$tmp_file2"
1004+
rm -rf "$tmp_dir"
1005+
fi
1006+
1007+
echo "$override_switch"
1008+
}
1009+
9651010
# args:
9661011
# input_files - stdin
9671012
# root_path - $1
@@ -973,17 +1018,7 @@ copy_files_or_dirs_from_list() {
9731018
local root_path="$(remove_trailing_slash "$1")"
9741019
local out_path="$(remove_trailing_slash "$2")"
9751020
local override="$3"
976-
local osname="$(get_current_os_name)"
977-
local override_switch=$(
978-
if [ "$override" = false ]; then
979-
if [ "$osname" = "linux-musl" ]; then
980-
printf -- "-u";
981-
else
982-
# cp: warning: behavior of -n is non-portable and may change in future; use --update=none instead
983-
# printf -- "-n";
984-
printf -- "--update=none";
985-
fi
986-
fi)
1021+
local override_switch="$(get_cp_options "$override")"
9871022

9881023
cat | uniq | while read -r file_path; do
9891024
local path="$(remove_beginning_slash "${file_path#$root_path}")"
@@ -1036,8 +1071,7 @@ extract_dotnet_package() {
10361071

10371072
say "extract_dotnet_package: zip_path=$zip_path, temp_out_path=$temp_out_path, out_path=$out_path"
10381073

1039-
if [ ! -d "$temp_out_path" ]; then mkdir "$temp_out_path"; fi
1040-
1074+
10411075
local failed=false
10421076
if [ "$quiet" != true ]; then
10431077
tar -xzf "$zip_path" -C "$temp_out_path" > /dev/null || failed=true
@@ -1051,7 +1085,7 @@ extract_dotnet_package() {
10511085

10521086
validate_remote_local_file_sizes "$zip_path" "$remote_file_size"
10531087

1054-
# rm -rf "$temp_out_path"
1088+
rm -rf "$temp_out_path"
10551089
if [ -z ${keep_zip+x} ]; then
10561090
rm -f "$zip_path" && say_verbose "Temporary archive file $zip_path was removed"
10571091
fi
@@ -1767,7 +1801,7 @@ do
17671801
zip_path="$1"
17681802
;;
17691803
-?|--?|-h|--help|-[Hh]elp)
1770-
script_name="$(basename "$0")"
1804+
script_name="dotnet-install.sh"
17711805
echo ".NET Tools Installer"
17721806
echo "Usage:"
17731807
echo " # Install a .NET SDK of a given Quality from a given Channel"
@@ -1898,4 +1932,4 @@ fi
18981932

18991933
say "Note that the script does not resolve dependencies during installation."
19001934
say "To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the \"Dependencies\" section."
1901-
say "Installation finished successfully."
1935+
say "Installation finished successfully."

devops/install/install_cuDNN.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,17 @@
3737
# sudo apt-get update -y
3838
# sudo apt-get -y install cuda-X.Y
3939

40+
if [ "$1" == "" ]; then
41+
echo "Please provide the CUDA version for which to install cuDNN"
42+
exit
43+
fi
4044

4145
# cuda_version=$1
4246
# Get major.minor CUDA version
4347
cuda_version=$(cut -d '.' -f 1,2 <<< "$1")
4448

4549
# This script is intended to be called from setup.sh, which includes architecture
46-
# and os vars as well as writeline methods. If we don't find them, do quick checks
50+
# and os vars as well as writeLine methods. If we don't find them, do quick checks
4751

4852
if [[ $(type -t writeLine) != function ]]; then
4953

@@ -97,10 +101,14 @@ writeLine "Setting up CUDA ${cuda_version} and cuDNN" $color_info
97101
# ==============================================================================
98102
# GET SETTINGS
99103

100-
cuda_GPGpublicKey=""
104+
cuda_GPGpublicKey="3bf863cc"
101105

102106
case "$cuda_version" in
103-
"12.2") cuda_version_full="12.2.1"; cuda_GPGpublicKey="3bf863cc" ;;
107+
"12.6") cuda_version_full="12.6.1"; cuda_GPGpublicKey="3bf863cc" ;;
108+
"12.5") cuda_version_full="12.5.1"; cuda_GPGpublicKey="3bf863cc" ;;
109+
"12.5") cuda_version_full="12.4.1"; cuda_GPGpublicKey="3bf863cc" ;;
110+
"12.3") cuda_version_full="12.3.2"; cuda_GPGpublicKey="3bf863cc" ;;
111+
"12.2") cuda_version_full="12.2.2"; cuda_GPGpublicKey="3bf863cc" ;;
104112
"12.1") cuda_version_full="12.1.1"; cuda_GPGpublicKey="3bf863cc" ;;
105113
"12.0") cuda_version_full="12.0.1"; cuda_GPGpublicKey="3bf863cc" ;;
106114
"11.8") cuda_version_full="11.8.0"; cuda_GPGpublicKey="3bf863cc" ;;

docs/WSL-README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,19 @@ exit
132132
```
133133

134134
Your WSL virtual hard drive should be smaller and the space that was used
135-
reclaimed by Windows.
135+
reclaimed by Windows.
136+
137+
## GPU Support under WSL
138+
139+
Please read [NVIDIAs guide](https://docs.nvidia.com/cuda/wsl-user-guide/index.html#step-1-install-nvidia-driver-for-gpu-support). The main points are:
140+
141+
1. **DO NOT install NVIDIA drivers within WSL**. The Windows drivers will work under WSL, so installing drivers *inside* WSL will overwrite the Windows drivers and lead to issues
142+
143+
2. **DO install the NVIDIA toolkit separately in WSL**. Head to the [toolkit download page](https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=WSL-Ubuntu&target_version=2.0&target_type=deb_network) to find the correct instructions. For Windows 11 on CUDA 12.6, for example, the instructions are
144+
145+
``` bash
146+
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-keyring_1.1-1_all.deb
147+
sudo dpkg -i cuda-keyring_1.1-1_all.deb
148+
sudo apt-get update
149+
sudo apt-get -y install cuda-toolkit-12-6
150+
```

src/demos/modules/PythonSimple/requirements.linux.cuda.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ torchvision==0.14.0+cu117 # Installing TorchVision, for working with compu
1111
# Specific version because we have a patch
1212
ultralytics==8.1.2 # Installing Ultralytics package for object detection in images
1313

14-
CodeProject-AI-SDK # Installing the CodeProject.AI SDK
14+
CodeProject-AI-SDK # Installing the CodeProject.AI SDK
1515

1616
# last line empty..

src/demos/modules/PythonSimple/requirements.linux.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ torchvision==0.14.1+cpu # Installing TorchVision, for Computer Vision ba
1212
# Specific version because we have a patch
1313
ultralytics==8.1.2 # Installing Ultralytics package for object detection in images
1414

15+
CodeProject-AI-SDK # Installing the CodeProject.AI SDK
16+
1517
# last line empty.

src/demos/modules/PythonSimple/requirements.macos.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ numpy<2 # Installing NumPy, a package for scientific com
55
# Specific version because we have a patch
66
ultralytics==8.1.2 # Installing Ultralytics package for object detection in images
77

8-
CodeProject-AI-SDK # Installing the CodeProject.AI SDK
8+
CodeProject-AI-SDK # Installing the CodeProject.AI SDK
99

1010
# last line empty.

src/demos/modules/PythonSimple/requirements.windows.cuda.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ torchvision==0.14.0+cu117 # Installing TorchVision, for working with compu
1111
# Specific version because we have a patch
1212
ultralytics==8.1.2 # Installing Ultralytics package for object detection in images
1313

14-
CodeProject-AI-SDK # Installing the CodeProject.AI SDK
14+
CodeProject-AI-SDK # Installing the CodeProject.AI SDK
1515

1616
# last line empty.

0 commit comments

Comments
 (0)