Skip to content

Commit f4c0a23

Browse files
author
Chris Maunder
committed
Updated to 2.6.5
1 parent 89608e2 commit f4c0a23

File tree

341 files changed

+5610
-2772
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

341 files changed

+5610
-2772
lines changed

CodeProject.AI.sln

Lines changed: 99 additions & 84 deletions
Large diffs are not rendered by default.

WSL-README.md

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Notes on developing under WSL
22

3-
This repository can be run under Windows or WSL at the same time. The setup.bat
3+
This repository can be run under Windows and WSL at the same time. The setup.bat
44
and setup.sh scripts will install runtimes and virtual environments into specific
55
locations for the given OS. Virtual environments, for example, will live under
66
the /bin/windows folder for a module in Windows, and /bin/linux when under Linux.
@@ -14,16 +14,24 @@ profile sync mechanism in VS Code makes this seamless.
1414

1515
## VSCode integrated terminals won't load .bashrc, and so $PATH may not be accurate
1616

17-
If you are using VSCode in WSL, the integrated terminal doesn't load the login stuff. This means your .bashrc isn't loaded.
17+
If you are using VSCode in WSL, the integrated terminal doesn't load the login
18+
stuff. This means your .bashrc isn't loaded.
1819

19-
If you've installed a CUDA toolkit which has set paths in the `PATH` variable and updated the .bashrc file, the `PATH` variable won't have the CUDA paths in it, meaning you won't get access to all the CUDA tools (typically just `nvidia-smi`, not `nvcc`).
20+
If you've installed a CUDA toolkit which has set paths in the `PATH` variable
21+
and updated the .bashrc file, the `PATH` variable won't have the CUDA paths in
22+
it, meaning you won't get access to all the CUDA tools (typically just
23+
`nvidia-smi`, not `nvcc`).
2024

21-
If the install scripts can only see `nvidia-smi` and not `nvcc` then those scripts will potentially see an incorrect version of CUDA. `nvidia-smi` reports the maximum CUDA version the drivers can support,
22-
whereas `nvcc` reports the actual CUDA version installed and accessible.
25+
If the install scripts can only see `nvidia-smi` and not `nvcc` then those
26+
scripts will potentially see an incorrect version of CUDA. `nvidia-smi` reports
27+
the maximum CUDA version the drivers can support, whereas `nvcc` reports the
28+
actual CUDA version installed and accessible.
2329

24-
Getting the wrong version of CUDA means potentially the wrong version of Python libraries such as PyTorch will be installed, leading to instability or failure.
30+
Getting the wrong version of CUDA means potentially the wrong version of Python
31+
libraries such as PyTorch will be installed, leading to instability or failure.
2532

26-
Install CodeProject.AI on a CUDA under WSL using a terminal window, not the integrated VSCode terminal
33+
Install CodeProject.AI on a CUDA under WSL using a terminal window, not the
34+
integrated VSCode terminal
2735

2836
## Getting a VSCode Integrated terminal to load login profiles under WSL
2937

@@ -36,13 +44,14 @@ To get the login profile loaded add this to your settings.json file
3644
```
3745
The settings files are typically located in
3846

39-
| OS | settings location |
40-
|----|-------------------|
41-
|Windows | `C:\Users\<username>\AppData\Roaming\Code\User\settings.json` |
42-
|Linux | `$HOME/.config/Code/User/settings.json` |
43-
|macOS | `$HOME/Library/Application\ Support/Code/User/settings.json` |
47+
| OS | settings location |
48+
|---------|---------------------------------------------------------------|
49+
| Windows | `C:\Users\<username>\AppData\Roaming\Code\User\settings.json` |
50+
| Linux | `$HOME/.config/Code/User/settings.json` |
51+
| macOS | `$HOME/Library/Application\ Support/Code/User/settings.json` |
4452

45-
You can also set your default profiles to achieve the same result (replace `osx` with `Windows` and `Linux` for other OS's)
53+
You can also set your default profiles to achieve the same result (replace `osx`
54+
with `Windows` and `Linux` for other OS's)
4655

4756
```json
4857
"terminal.integrated.profiles.osx": {
@@ -67,15 +76,35 @@ instance. Having a WSL instance of VS Code work on its own copy of this repo,
6776
separate from the Windows instance, speeds disk access (eg PIP installs)
6877
dramatically.
6978

79+
If you want speed, have a separate installation of this project in WSL.
80+
7081
## Space considerations
7182

7283
If you choose to run separate copies of the code in WSL and Windows then it means
7384
you are doubling up on the code, libraries, tools, and compiled executables. If
7485
you have limited disk space this can be an issue.
7586

87+
If you are low on space, use a shared installation of this project for WSL and
88+
Windows.
89+
7690
### To free up space
7791

78-
To free up space you can use the clean.bat/clean.sh scripts under /src/SDK/Utilities.
92+
To free up space you can use the clean.bat/clean.sh scripts under
93+
/src/SDK/Utilities.
94+
95+
For Windows
96+
```cmd
97+
cd src\SDK\Utilities
98+
clean all
99+
```
100+
For Linux/macOS
101+
```cmd
102+
cd src/SDK/Utilities
103+
bash clean.sh all
104+
```
105+
106+
Run `clean` without a parameter to see the options for fine-tuning what gets
107+
cleaned.
79108

80109
To actually realise the freed up space in WSL you will need to compact the VHD
81110
in which your WSL instance resides.
@@ -89,8 +118,8 @@ diskpart
89118

90119
This will shutdown WSL and open a disk partition session in a new window. Locate
91120
the VHD file for WSL by heading to `%LOCALAPPDATA%\Packages` and looking for a
92-
folder similar to `CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState` that contains a
93-
file `ext4.vhd`.
121+
folder similar to `CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState` that
122+
contains a file `ext4.vhd`.
94123

95124
Within the session, enter the following (adjusting the `ext4.vhd` location as needed)
96125

demos/modules/PythonLongProcess/long_process_demo_adapter.py

Lines changed: 0 additions & 129 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: "3.9"
2+
3+
services:
4+
CodeProjectAI:
5+
image: codeproject/ai-server
6+
container_name: codeproject-ai-server-cpu
7+
hostname: codeproject-ai-server
8+
# working_dir: /app
9+
restart: unless-stopped
10+
privileged: true
11+
ports:
12+
- "32168:32168/tcp"
13+
- "32168:32168/udp"
14+
environment:
15+
- TZ=America/Toronto
16+
volumes:
17+
- '/dev/bus/usb:/dev/bus/usb' # Enable Coral USB
18+
# - '/opt/codeproject/ai:/app/modules' # Linux
19+
# - '/Library/Application Support/CodeProject/AI/docker/modules:/app/modules' # macOS
20+
# - 'C:\ProgramData\CodeProject\AI\docker\modules:/app/modules' # Windows
21+
22+
# command:
23+
# - --Modules:BackgroundRemover:Activate=False
24+
# - --Modules:BackgroundRemoval:Activate=False
25+
# - --Modules:CustomDetection:Activate=False
26+
# - --Modules:CustomObjectDetection:Activate=False
27+
# - --Modules:PortraitFilter:Activate=False
28+
# - --Modules:SceneClassification:Activate=False
29+
# - --Modules:VisionObjectDetection:Activate=False
30+
# - --Modules:FaceProcessing:EnvironmentVariables:USE_CUDA=True
31+
32+
# If you wish to use volumes, then:
33+
# volumes:
34+
# - codeproject_ai_data_gpu:/etc/codeproject/ai
35+
# - codeproject_ai_modules_gpu:/app/modules
36+
#
37+
#volumes:
38+
# codeproject_ai_data_gpu:
39+
# codeproject_ai_modules_gpu:
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: '3.9'
2+
3+
services:
4+
CodeProjectAI:
5+
image: codeproject/ai-server:cuda10_2
6+
container_name: "codeproject-ai-server-cuda"
7+
restart: unless-stopped
8+
ports:
9+
- "32168:32168/tcp"
10+
- "32168:32168/udp"
11+
environment:
12+
- TZ=America/Toronto
13+
deploy:
14+
resources:
15+
reservations:
16+
devices:
17+
- driver: nvidia
18+
count: 1
19+
capabilities: [gpu]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: '3.9'
2+
3+
services:
4+
CodeProjectAI:
5+
image: codeproject/ai-server:cuda11_7
6+
container_name: "codeproject-ai-server-cuda"
7+
restart: unless-stopped
8+
ports:
9+
- "32168:32168/tcp"
10+
- "32168:32168/udp"
11+
environment:
12+
- TZ=America/Toronto
13+
volumes:
14+
- codeproject_ai_data_cuda11_7:/etc/codeproject/ai
15+
- codeproject_ai_modules_cuda11_7:/app/modules
16+
deploy:
17+
resources:
18+
reservations:
19+
devices:
20+
- driver: nvidia
21+
count: 1
22+
capabilities: [gpu]
23+
volumes:
24+
codeproject_ai_data_cuda11_7:
25+
codeproject_ai_modules_cuda11_7:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: '3.9'
2+
3+
services:
4+
CodeProjectAI:
5+
image: codeproject/ai-server:cuda12_2
6+
container_name: "codeproject-ai-server-cuda"
7+
restart: unless-stopped
8+
ports:
9+
- "32168:32168/tcp"
10+
- "32168:32168/udp"
11+
environment:
12+
- TZ=America/Toronto
13+
volumes:
14+
- codeproject_ai_data_cuda12_2:/etc/codeproject/ai
15+
- codeproject_ai_modules_cuda12_2:/app/modules
16+
deploy:
17+
resources:
18+
reservations:
19+
devices:
20+
- driver: nvidia
21+
count: 1
22+
capabilities: [gpu]
23+
volumes:
24+
codeproject_ai_data_cuda12_2:
25+
codeproject_ai_modules_cuda12_2:
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
version: "3.9"
2+
3+
services:
4+
CodeProjectAI:
5+
image: codeproject/ai-server:gpu
6+
container_name: codeproject-ai-server-gpu
7+
hostname: codeproject-ai-server
8+
# working_dir: /app
9+
restart: unless-stopped
10+
ports:
11+
- "32168:32168/tcp"
12+
- "32168:32168/udp"
13+
environment:
14+
- TZ=America/Toronto
15+
volumes:
16+
- '/opt/codeproject/ai:/app/modules' # Linux
17+
# - '/Library/Application Support/CodeProject/AI/docker/modules:/app/modules' # macOS
18+
# - 'C:\ProgramData\CodeProject\AI\docker\modules:/app/modules' # Windows
19+
deploy:
20+
resources:
21+
reservations:
22+
devices:
23+
- driver: nvidia
24+
count: 1
25+
capabilities: [gpu]
26+
27+
# command:
28+
# - --Modules:BackgroundRemover:Activate=False
29+
# - --Modules:BackgroundRemoval:Activate=False
30+
# - --Modules:CustomDetection:Activate=False
31+
# - --Modules:CustomObjectDetection:Activate=False
32+
# - --Modules:PortraitFilter:Activate=False
33+
# - --Modules:SceneClassification:Activate=False
34+
# - --Modules:VisionObjectDetection:Activate=False
35+
# - --Modules:FaceProcessing:EnvironmentVariables:USE_CUDA=True
36+
37+
# If you wish to use volumes, then:
38+
# volumes:
39+
# - codeproject_ai_data_gpu:/etc/codeproject/ai
40+
# - codeproject_ai_modules_gpu:/app/modules
41+
#
42+
#volumes:
43+
# codeproject_ai_data_gpu:
44+
# codeproject_ai_modules_gpu:

0 commit comments

Comments
 (0)