Skip to content

Commit

Permalink
Merge branch 'feature/gpu-detection-prompt' of github.com:janhq/jan i…
Browse files Browse the repository at this point in the history
…nto feature/gpu-detection-prompt
  • Loading branch information
hiento09 committed Dec 29, 2023
2 parents 54c3562 + ad3b829 commit 083e3e3
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 34 deletions.
50 changes: 27 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Jan is an open-source ChatGPT alternative that runs 100% offline on your compute
<tr style="text-align: center">
<td style="text-align:center"><b>Experimental (Nighlty Build)</b></td>
<td style="text-align:center" colspan="4">
<a href='https://github.com/janhq/jan/actions/runs/7341513351'>
<a href='https://github.com/janhq/jan/actions/runs/7350847486'>
<b>Github action artifactory</b>
</a>
</td>
Expand All @@ -81,25 +81,25 @@ Download the latest version of Jan at https://jan.ai/ or visit the **[GitHub Rel

## Demo

<p align="center">
<video src="https://github.com/janhq/jan/assets/89722390/43adfddc-7980-4ae6-b544-719f04660dd7">
</video>
</p>
![Demo](/demo.gif)


_Video: Jan v0.4.0 on Mac Air M2, 16GB Ventura_
_Realtime Video: Jan v0.4.3-nightly on a Mac M1, 16GB Sonoma 14_

## Quicklinks

#### Jan

- [Jan website](https://jan.ai/)
- [Jan Github](https://github.com/janhq/jan)
- [User Guides](https://jan.ai/docs)
- [Developer docs](https://jan.ai/docs/extensions/)
- [API reference](https://jan.ai/api-reference/)
- [Specs](https://jan.ai/specs/)

#### Nitro:
Nitro is a high-efficiency C++ inference engine for edge computing, powering Jan. It is lightweight and embeddable, ideal for product integration.
#### Nitro

Nitro is a high-efficiency C++ inference engine for edge computing. It is lightweight and embeddable, and can be used on its own within your own projects.

- [Nitro Website](https://nitro.jan.ai)
- [Nitro Github](https://github.com/janhq/nitro)
- [Documentation](https://nitro.jan.ai/docs)
Expand All @@ -118,21 +118,22 @@ To reset your installation:
```

This will remove all build artifacts and cached files:

- Delete Jan from your `/Applications` folder
- Clear Application cache in `/Users/$(whoami)/Library/Caches/jan`

2. Use the following commands to remove any dangling backend processes:

```sh
ps aux | grep nitro
```
```sh
ps aux | grep nitro
```

Look for processes like "nitro" and "nitro_arm_64," and kill them one by one with:

Look for processes like "nitro" and "nitro_arm_64," and kill them one by one with:
```sh
kill -9 <PID>
```

```sh
kill -9 <PID>
```

## Contributing

Contributions are welcome! Please read the [CONTRIBUTING.md](CONTRIBUTING.md) file
Expand Down Expand Up @@ -176,19 +177,22 @@ This will build the app MacOS m1/m2 for production (with code signing already do

## Nightly Build

Nightly build is a process where the software is built automatically every night. This helps in detecting and fixing bugs early in the development cycle. The process for this project is defined in [`.github/workflows/jan-electron-build-nightly.yml`](.github/workflows/jan-electron-build-nightly.yml)

You can join our Discord server [here](https://discord.gg/FTk2MvZwJH) and go to channel [github-jan](https://discordapp.com/channels/1107178041848909847/1148534730359308298) to monitor the build process.
Our nightly build process for this project is defined in [`.github/workflows/jan-electron-build-nightly.yml`](.github/workflows/jan-electron-build-nightly.yml)

The nightly build is triggered at 2:00 AM UTC every day.

The nightly build can be downloaded from the url notified in the Discord channel. Please access the url from the browser and download the build artifacts from there.
Getting on Nightly:

1. Join our Discord server [here](https://discord.gg/FTk2MvZwJH) and go to channel [github-jan](https://discordapp.com/channels/1107178041848909847/1148534730359308298).
2. Download the build artifacts from the channel.
3. Subsequently, to get the latest nightly, just quit and restart the app.
4. Upon app restart, you will be automatically prompted to update to the latest nightly build.

## Manual Build

Manual build is a process where the software is built manually by the developers. This is usually done when a new feature is implemented or a bug is fixed. The process for this project is defined in [`.github/workflows/jan-electron-build-nightly.yml`](.github/workflows/jan-electron-build-nightly.yml)
Stable releases are triggered by manual builds. This is usually done for new features or a bug fixes.

It is similar to the nightly build process, except that it is triggered manually by the developers.
The process for this project is defined in [`.github/workflows/jan-electron-build-nightly.yml`](.github/workflows/jan-electron-build-nightly.yml)

## Acknowledgements

Expand Down
2 changes: 1 addition & 1 deletion core/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export abstract class BaseExtension {
* Called when the extension is loaded.
* Any initialization logic for the extension should be put here.
*/
abstract onLoad(): Promise<void>;
abstract onLoad(): void;
/**
* Called when the extension is unloaded.
* Any cleanup logic for the extension should be put here.
Expand Down
Binary file added demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 13 additions & 3 deletions web/containers/GPUDriverPromptModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,29 @@ const GPUDriverPrompt: React.FC = () => {
<Modal open={showNotification} onOpenChange={openChanged}>
<ModalContent>
<ModalHeader>
<ModalTitle>Missing Cuda Toolkit</ModalTitle>
<ModalTitle>Missing Nvidia Driver and Cuda Toolkit</ModalTitle>
</ModalHeader>
<p>
It seems like you are missing Cuda Toolkit. Please follow the
instructions on the{' '}
It seems like you are missing Nvidia Driver or Cuda Toolkit or both.
Please follow the instructions on the{' '}
<span
className="cursor-pointer text-blue-600"
onClick={() =>
openExternalUrl('https://developer.nvidia.com/cuda-toolkit')
}
>
NVidia Cuda Toolkit Installation Page
</span>{' '}
and the{' '}
<span
className="cursor-pointer text-blue-600"
onClick={() =>
openExternalUrl('https://www.nvidia.com/Download/index.aspx')
}
>
Nvidia Driver Installation Page
</span>
.
</p>
<div className="flex items-center space-x-2">
<input
Expand Down
8 changes: 3 additions & 5 deletions web/extension/ExtensionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ export class ExtensionManager {
* Loads all registered extension.
*/
load() {
this.listExtensions()
.map((e) => e.onLoad())
.reduce((p, load) => {
return p.then(load)
}, Promise.resolve())
this.listExtensions().forEach((ext) => {
ext.onLoad()
})
}

/**
Expand Down
4 changes: 2 additions & 2 deletions web/hooks/useSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const useSettings = () => {
if (
settings &&
settings.notify &&
settings.nvidia_driver?.exist &&
!settings.cuda?.exist
((settings.nvidia_driver?.exist && !settings.cuda?.exist) ||
!settings.nvidia_driver?.exist)
) {
setShowNotification(true)
}
Expand Down

0 comments on commit 083e3e3

Please sign in to comment.