Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
4 changes: 3 additions & 1 deletion WebUI/electron/subprocesses/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ export async function createEnhancedErrorDetails(

export const aipgBaseDir = () =>
app.isPackaged ? process.resourcesPath : path.join(__dirname, '../../../')
const buildResources = () =>
app.isPackaged ? aipgBaseDir() : path.join(aipgBaseDir(), 'build', 'resources')
export const hijacksDir = path.resolve(path.join(aipgBaseDir(), `hijacks/ipex_to_cuda`))
const hijacksRemote = 'https://github.com/Disty0/ipex_to_cuda.git'
const hijacksRevision = '7379d6ecbc26a96b1a39f6fc063c61fc8462914f'
Expand Down Expand Up @@ -383,7 +385,7 @@ export class GitService extends ExecutableService {
'https://github.com/git-for-windows/git/releases/download/v2.51.2.windows.1/PortableGit-2.51.2-64-bit.7z.exe'
readonly sha256 = 'f5764d546ff9a2511b50ec4e20424c5f4669de1695abc3fa4128e7f7d4a7b2cd'
readonly zipPath = path.resolve(path.join(this.baseDir, 'portable-git.7z.exe'))
readonly unzipExePath = path.resolve(path.join(this.baseDir, '7zr.exe'))
readonly unzipExePath = path.resolve(path.join(buildResources(), '7zr.exe'))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please name this this.buildResourcesDir similar to this.buildDir, and use either what was there before, or the other path (when in during dev setup).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in commit 9ba814c. Refactored buildResources() to be an instance property this.buildResourcesDir in the GenericServiceImpl class, following the same pattern as this.baseDir. This provides better consistency and code organization.


private async checkGitZip(): Promise<boolean> {
if (!filesystem.existsSync(this.zipPath)) {
Expand Down
25 changes: 4 additions & 21 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,31 +67,14 @@ cd WebUI
npm install
```

### Prepare Python Environment
### Prepare Development Environment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Did you check for other places where conda and the likes are mentioned?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in commit 9ba814c. Removed conda references from AGENTS.md and WebUI/build/README.md. All documentation now reflects the simplified uv-based workflow.


1. Install Miniforge to manage your Conda environment: https://github.com/conda-forge/miniforge

2. Create a Conda environment with Python 3.11 and libuv:
```
conda create -n cp311_libuv python=3.11 libuv -y
```

3. Locate the path to your newly created Conda environment:
```
conda env list | findstr cp311_libuv
```

4. In the `WebUI` directory, execute the `fetch-build-resources` script, replacing `<path_to_cp311_libuv_conda_env>` with the actual path you copied in the previous step:
```
npm run fetch-build-resources -- --conda_env_dir=<path_to_cp311_libuv_conda_env>
```

5. Run the `prepare-build` script:
1. In the `WebUI` directory, run the `fetch-build-resources` script to download required build resources:
```
npm run prepare-build
npm run fetch-build-resources
```

You should now have a basic Python environment located at `build-envs\online\prototype-python-env`.
This will download `uv` (Python package manager) and other required tools to the `build/resources/` directory.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@copilot
This is correct, but you still missed an important point. If set up like this, the following doesn't work as expected:

  • I open the App,
  • click "Install" on the "Ai Playground Setup" page in the "Ai Playground" row, and
  • Status: Failed
    And in the dev tools I can see:
    [ai-backend] Set up of service failed due to Error: Unzip error: Error: Command failed:
    and
    ai-playground\7zr.exe"' is not recognized as an internal or external command, operable program or batch file.
    I am sure it looks for 7zr in the wrong path. That is what was meant by that "adjust path" comment in the original ticket.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in commit 24514e1. The GitService was looking for 7zr.exe in the repo root, but fetch-build-resources downloads it to build/resources/7zr.exe. I've added a buildResources() helper function (same pattern as in uv.ts) to correctly resolve the path to build/resources/7zr.exe in development mode and to the packaged resources path in production.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Iirc there is some entry in the .gitignore, which should no longer be needed now.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in commit a400b82. Removed the obsolete 7zr.exe entry from .gitignore since the file is now at build/resources/7zr.exe, which is already covered by the /build/ entry on line 7.


### Launch the application

Expand Down