feat: pre-packaged engine variants and installation directory #4337
Description
Problem Statement
This is a subtask of #4128
Currently, Jan packages all the available engines into the compressed app resource folder. E.g. on MacOS, it's inside Jan.app > Contents > Resources > app.asar.unpacked > shared. Since this folder is read-only, there's no way to download, install, or update the engine variant in the directory.
Jan defines a writable engine directory inside Jan Data Folder:
- A. Jan will have to copy engine files to a writable directory on the first launch, which can cause users to wait for a significant amount of time (5-10 minutes on Windows).
- B. cortex.cpp supports two engine directories, which is a bit tricky. One directory is for packed engine variants, while the other is for new download variants.
We have agreed on the following:
• Package all available engine variants for the latest version at release time to ensure:
• Users who are not yet familiar with the new engine variant settings can continue seamlessly.
• The current settings of existing users remain unaffected.
• Jan can run with CUDA GPU acceleration without requiring additional setup within Jan
Feature Idea
Thinking about switching the engine directory while cortex.cpp is running instead of using ENV which can only set on server run
Another path:
- Customize the Jan installer to install the default engine variants to the Jan Data Folder. Downside: Factor Reset would wipe out installed engine files then users will have to download from scratch.
Update
RESOLVED:
Jan will create symlinks to the pre-bundled versions in the app data folder. This way, the cortex.cpp server can use the default engines
folder that works consistently.
Concern:
- Mobile compatibility:
This approach deals with large engine variants bundles like Windows and Linux with CUDA support. On mobile, the engine should be lightweight, and copying over is fine.
Metadata
Assignees
Labels
Type
Projects
Status
Completed