Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync dev branch to docs branch #2131

Merged
merged 194 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
dc9c84a
fix(yarn-mistral): broken gguf model
hahuyhoang411 Jan 29, 2024
73171c8
add(dolphin phi2): add new best 3b model
hahuyhoang411 Jan 29, 2024
693c4e8
add(stablezephyr): add new stable 3b model
hahuyhoang411 Jan 29, 2024
6c27bb8
add(llamacorn): add new stable 1b model
hahuyhoang411 Jan 29, 2024
8cda768
add(llamacorn): correct tags
hahuyhoang411 Jan 29, 2024
259ae3c
fix(stable zephyr): update description
hahuyhoang411 Jan 29, 2024
fc04c16
fix(model extension): pump to 1.0.24
hahuyhoang411 Jan 29, 2024
a1ac7f9
fix(yarn-mistral): broken gguf model
hahuyhoang411 Jan 29, 2024
48a6be5
add(dolphin phi2): add new best 3b model
hahuyhoang411 Jan 29, 2024
698f1f5
add(stablezephyr): add new stable 3b model
hahuyhoang411 Jan 29, 2024
f22ad8a
add(llamacorn): add new stable 1b model
hahuyhoang411 Jan 29, 2024
25d7c6a
add(llamacorn): correct tags
hahuyhoang411 Jan 29, 2024
8d81c7e
fix(stable zephyr): update description
hahuyhoang411 Jan 29, 2024
76bff3b
fix(model extension): pump to 1.0.24
hahuyhoang411 Jan 29, 2024
20e7d30
Updates Guide Using the Local Server
SamPatt Feb 5, 2024
24dd13a
fix(dolphin-phi): redundant of new lines character
hahuyhoang411 Feb 5, 2024
d6cfc3f
Scaffold Docs Site Structure
dan-menlo Feb 6, 2024
78d0b1e
Remove /events page that was causing errors
dan-menlo Feb 6, 2024
e6ea11e
chore: Add Author - Hiro
hiro-v Feb 7, 2024
9dae95a
add author
imtuyethan Feb 7, 2024
d070830
Merge pull request #1949 from janhq/chore/add_author_hiro
0xHieu01 Feb 7, 2024
47df390
Merge branch 'dev' into update/add-ashley-author
0xHieu01 Feb 7, 2024
893d735
chore: add author james
Feb 7, 2024
1d0128a
Merge pull request #1950 from janhq/update/add-ashley-author
0xHieu01 Feb 7, 2024
5ce16c0
Merge branch 'dev' into chore/add-author-james
0xHieu01 Feb 7, 2024
8ef33c8
Merge pull request #1952 from janhq/chore/add-author-james
0xHieu01 Feb 7, 2024
2fc8f22
Update authors.yml
hiento09 Feb 7, 2024
fe29265
Update authors.yml for Van Pham
Van-QA Feb 7, 2024
1442479
Merge pull request #1954 from janhq/chore/add-author-van
hiro-v Feb 7, 2024
60d4fd1
Update authors.yml Louis
louis-menlo Feb 7, 2024
4188865
Update authors.yml Rex
hahuyhoang411 Feb 7, 2024
5890ade
chore: server download progress + S3 (#1925)
louis-menlo Feb 7, 2024
9a1b1ad
fix: update conditional check last status message (#1951)
urmauur Feb 7, 2024
44a7f05
fix: authors.yml
hahuyhoang411 Feb 7, 2024
fd36310
feat: integrate umami script locally
0xHieu01 Feb 7, 2024
b2659ac
fix lint issue
0xHieu01 Feb 7, 2024
b864a28
change to mainpage
0xHieu01 Feb 7, 2024
3b0fb4d
Update docs run Jan Server in Docker mode (#1960)
hiento09 Feb 7, 2024
8feaf24
Change env Dockerfile.gpu and update README (#1963)
hiento09 Feb 7, 2024
cbb8e79
Merge branch 'dev' into chore/hien-update-author
0xHieu01 Feb 7, 2024
31e6bcb
Merge pull request #1953 from janhq/chore/hien-update-author
0xHieu01 Feb 7, 2024
eb532ba
Merge branch 'dev' into chore/louis-update-author
0xHieu01 Feb 7, 2024
d2c6d9c
Merge pull request #1955 from janhq/chore/louis-update-author
0xHieu01 Feb 7, 2024
e23c2ce
Merge branch 'dev' into chore/rex-update-author
0xHieu01 Feb 7, 2024
68d7d19
Merge pull request #1956 from janhq/chore/rex-update-author
0xHieu01 Feb 7, 2024
a8c1d70
Merge pull request #1958 from janhq/feat-umami-integration
0xHieu01 Feb 7, 2024
dfaab4f
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 7, 2024
c85b756
Merge branch 'dev' into local-server-documentation
0xHieu01 Feb 7, 2024
9e7348e
fix: RAG enhancements (#1965)
urmauur Feb 8, 2024
7ae36a3
docs: add author Henry
0xHieu01 Feb 8, 2024
15ae120
Merge branch 'dev' into local-server-documentation
freelerobot Feb 9, 2024
dd8c0ee
chore: update slug
freelerobot Feb 9, 2024
3a34d53
chore: keep slug consistent
freelerobot Feb 9, 2024
fe02d03
docs: Update authors.yml
freelerobot Feb 9, 2024
7d98ce8
Merge pull request #1973 from janhq/update-authors.yml-hieu
freelerobot Feb 9, 2024
7c37bc6
Scaffold the About section
dan-menlo Feb 9, 2024
bb11bc2
feat: add modal troubleshooting guideline (#1968)
urmauur Feb 9, 2024
eb09399
chore: reduce bundle size (#1970)
louis-menlo Feb 9, 2024
d518370
docs: add Jan installation using Docker
0xHieu01 Feb 9, 2024
5ec4b8e
feat: revamp ui dropdown list model option (#1977)
urmauur Feb 9, 2024
71f77c6
Scaffold 'About' Pages
dan-menlo Feb 10, 2024
465fb95
Refactor about page to other pages
dan-menlo Feb 10, 2024
212397d
fix: model downloads broken on nightly (#1984)
louis-menlo Feb 10, 2024
47c504f
Edit About page
dan-menlo Feb 10, 2024
63a1016
Merge dev branch
dan-menlo Feb 10, 2024
5864f49
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 10, 2024
875c2bc
feat: Thread titles should auto-summarize Topic (#1976)
0xgokuz Feb 10, 2024
130674e
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 10, 2024
442d142
Fix macos auto update failed (#1991)
hiento09 Feb 10, 2024
d371120
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 10, 2024
0db1763
fix: retrieval stuck at generating response (#1988)
louis-menlo Feb 11, 2024
48455b8
Merge branch 'dev' into docs-add-docker-installation
0xHieu01 Feb 11, 2024
fd78631
Merge pull request #1981 from janhq/docs-add-docker-installation
0xHieu01 Feb 11, 2024
ac76dd3
docs: update 03-gpu-not-used with RTX issues
0xHieu01 Feb 11, 2024
bcf6103
fix: app fails gracefully with clear error messages (#1993)
louis-menlo Feb 11, 2024
ac18fc1
fix: decouple thread summary update (#1994)
louis-menlo Feb 11, 2024
cf730e5
Merge pull request #1992 from janhq/docs-troubleshoot-RTX-Series-issue
0xHieu01 Feb 11, 2024
7ae6e35
feat: add edit messages users (#1974)
urmauur Feb 12, 2024
9e69946
fix: app stuck generating assistant response (#2001)
louis-menlo Feb 12, 2024
4e83cf3
fix: lack of auto-cleaning mechanism for logs (#2003)
louis-menlo Feb 12, 2024
da4b865
Small changes
dan-menlo Feb 13, 2024
63fde87
docs: jan desktop page
Feb 13, 2024
7c354e7
docs: server suite docs
Feb 13, 2024
6f520b4
feat: imporve UI/UX gpu acceleration feature (#1990)
urmauur Feb 13, 2024
3c36cbd
chore: ignore empty pages
Feb 13, 2024
3a10b40
docs: decouple homeserver v enterprise
Feb 13, 2024
8a1e3ba
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 13, 2024
5f95841
refactor: reduce IPC & API handlers - shared node logics (#2011)
louis-menlo Feb 14, 2024
3b51f3d
chore: bump nitro 0.3.9 (#2016)
louis-menlo Feb 14, 2024
f2e3187
fix: resolve state update loop infinitive rerendering (#2017)
louis-menlo Feb 14, 2024
f0fd2c5
fix: model path backward compatible (#2018)
louis-menlo Feb 14, 2024
b11f51d
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 14, 2024
3412a23
chore: prettier fix (#2019)
louis-menlo Feb 15, 2024
9cc9b4d
server install core using link instead of file (#2025)
hiento09 Feb 15, 2024
3ab23d5
fix: local server blank parameters if there is no thread selected (#2…
louis-menlo Feb 15, 2024
ab77622
fix: content setting right panel default to collapse (#2026)
urmauur Feb 15, 2024
05eebfa
fix: factory reset not remove jan data folder (#2027)
namchuai Feb 15, 2024
82b361a
feat: Initialize POM structure with fixtures on Playwright (#2015)
Van-QA Feb 15, 2024
a96053e
fix: app should generate thread title with length restriction (#2037)
louis-menlo Feb 15, 2024
f5934d5
fix: ui for disabled state of gpu acceleration (#2034)
namchuai Feb 15, 2024
fdc66da
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 15, 2024
ba63c92
Fix #2040 : added /v1 path to apiBase
ldebs Feb 15, 2024
8366964
Merge branch 'dev' into local-server-documentation
0xHieu01 Feb 15, 2024
e7722e4
docs: rename image file and format documentation
0xHieu01 Feb 16, 2024
8f07ee3
docs: enhance content
0xHieu01 Feb 16, 2024
3f31d79
docs: enhance documentation and add gif screenshots in high quality
0xHieu01 Feb 16, 2024
9fcc341
Merge pull request #1924 from SamPatt/local-server-documentation
0xHieu01 Feb 16, 2024
379a41f
Merge branch 'dev' into patch-1
0xHieu01 Feb 16, 2024
fb13d57
docs: update Continue Integration guide (#2041)
0xHieu01 Feb 16, 2024
b7e94aa
fix: disable gpu drop down box if there's no GPU ready (#2046)
namchuai Feb 16, 2024
42da19a
fix: download mutilple binaries (#2043)
namchuai Feb 16, 2024
63cffca
chore: refactor watch system resource hook (#2048)
louis-menlo Feb 16, 2024
7fb61bf
fix: update copy of message queue (#2051)
louis-menlo Feb 16, 2024
6590ee7
fix: local server start error should not change to started state (#2052)
louis-menlo Feb 16, 2024
47b890b
fix: message should only be interrupted when i start another thread (…
louis-menlo Feb 16, 2024
1a8593a
docs:add-advanced-settings-https-proxy (#2054)
0xHieu01 Feb 16, 2024
69244e6
chore: Update version.txt to 0.3.12 (#2057)
hiro-v Feb 16, 2024
537b7d8
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 17, 2024
599bfbd
Merge branch 'dev' into website/feb-2024-update
freelerobot Feb 17, 2024
a3aceb8
fix: settings page state loop and dark theme (#2065)
louis-menlo Feb 18, 2024
56034d6
fix: should stop running the model when GPU settings are changed (#2067)
louis-menlo Feb 18, 2024
20eb5ec
fix: infinity showed when haven't get total size (#2066)
namchuai Feb 18, 2024
da0d630
add docs for entire advanced settings (#2063)
0xHieu01 Feb 18, 2024
86a00e9
docs: add integration docs Mistral AI API
0xHieu01 Feb 18, 2024
83a61e3
Merge branch 'dev' into docs-add-integrating-mistral-ai
0xHieu01 Feb 18, 2024
04b0109
docs: fix typo
0xHieu01 Feb 18, 2024
3d19abe
docs: add integration docs Mistral AI API (#2070)
0xHieu01 Feb 18, 2024
9244fb9
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 18, 2024
3ea8c60
fix: check for updates should show no update are availale on the late…
louis-menlo Feb 18, 2024
85d6f4e
docs: finalize LM studio integration
0xHieu01 Feb 18, 2024
96df4ad
fix: move jan data folder - error handling - no write permission gran…
louis-menlo Feb 18, 2024
ee2099e
Merge branch 'dev' into docs-add-integration-lmstudio
0xHieu01 Feb 19, 2024
5a2b7ad
docs: add steps to migrating models from LM Studio
0xHieu01 Feb 19, 2024
15f9946
Merge branch 'docs-add-integration-lmstudio' of https://github.com/ja…
0xHieu01 Feb 19, 2024
2b0bc9f
update(openchat-3.5): pump to the latest version
hahuyhoang411 Feb 19, 2024
f7a3c92
fix(dolphin phi2): resolved conflict
hahuyhoang411 Feb 19, 2024
3af0ae1
Merge pull request #1829 from janhq/chore/update-hub
hahuyhoang411 Feb 19, 2024
b07525a
Merge branch 'dev' into docs-add-integration-lmstudio
0xHieu01 Feb 19, 2024
780f957
fix: expand assistant and model settings by default (#2081)
louis-menlo Feb 19, 2024
b9f5080
Merge branch 'dev' into docs-add-integration-lmstudio
0xHieu01 Feb 19, 2024
e8f5c22
fix: server crashes on missing module (#2089)
louis-menlo Feb 19, 2024
479d29e
Merge branch 'dev' into docs-add-integration-lmstudio
0xHieu01 Feb 19, 2024
ac62f90
docs: add ollama integration
0xHieu01 Feb 19, 2024
f43e6f3
Merge branch 'docs-add-integration-lmstudio' of https://github.com/ja…
0xHieu01 Feb 19, 2024
e25c4e2
docs: re-structure model docs
0xHieu01 Feb 19, 2024
43ea368
docs: update entire docs
0xHieu01 Feb 19, 2024
18deeeb
docs: fix minor typo
0xHieu01 Feb 19, 2024
0bf178e
docs: improve absolute filepath
0xHieu01 Feb 19, 2024
09e210a
fix: failed to send message blocks thread creation (#2091)
louis-menlo Feb 19, 2024
cbd1d37
fix make text input scrollable (#2083)
urmauur Feb 19, 2024
8baebaf
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 19, 2024
f98741a
Merge branch 'dev' into docs-add-integration-lmstudio
0xHieu01 Feb 19, 2024
53006dd
fix: broken model.json update (#2099)
louis-menlo Feb 19, 2024
5c7b791
fix: check if port is occupied before start local server (#2098)
namchuai Feb 19, 2024
c17dc2e
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 19, 2024
2cbbe1b
Fix bug #2005 docker blank website (#2093)
hiento09 Feb 19, 2024
6966c5d
fix: openai client sdk compatible (#2096)
louis-menlo Feb 20, 2024
a1c1db6
docs: add doubleslashes reminder for Windows users
0xHieu01 Feb 20, 2024
ad42b39
Merge branch 'dev' into docs-add-integration-lmstudio
0xHieu01 Feb 20, 2024
6b88d4d
fix: remove caret down icon when tab selected into remote model (#2102)
urmauur Feb 20, 2024
7fbc6cb
fix: failed to bind port - nitro error message copy (#2101)
louis-menlo Feb 20, 2024
49fa6d8
Feature helmchart and ci jan server (#2106)
hiento09 Feb 20, 2024
939f7c0
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 20, 2024
cffc382
fix: tools section should be expanded by default (#2110)
louis-menlo Feb 21, 2024
c8c9ec3
docs: resolve suggestions
0xHieu01 Feb 21, 2024
28832b3
docs: update based on suggestions
0xHieu01 Feb 21, 2024
db9ec32
Merge branch 'dev' into docs-add-integration-lmstudio
0xHieu01 Feb 21, 2024
055cf03
chore: add app version into log (#2116)
namchuai Feb 21, 2024
de89bf2
Merge branch 'dev' into docs-add-integration-lmstudio
0xHieu01 Feb 21, 2024
94bee0b
fix: flow edit message (#2113)
urmauur Feb 21, 2024
51bd375
fix: mismatching between nightly build and version - jan about (#2114)
louis-menlo Feb 21, 2024
79bcc3a
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 21, 2024
322c834
docs: add LM Studio and Ollama integrations guide & import model usi…
0xHieu01 Feb 22, 2024
f60d42a
fix: revert back menu actions (#2120)
louis-menlo Feb 22, 2024
926f19b
feat: Add nitro vulkan to support AMD GPU/ APU and Intel Arc GPU (#2056)
hiro-v Feb 22, 2024
a787f43
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 22, 2024
3c1aafd
docs: temporary remove 2035 vision page
0xHieu01 Feb 22, 2024
79cf9a8
Merge branch 'dev' into website/feb-2024-update
0xHieu01 Feb 22, 2024
58f733a
docs: update sidebar.js
0xHieu01 Feb 22, 2024
82b91aa
Merge branch 'website/feb-2024-update' of https://github.com/janhq/ja…
0xHieu01 Feb 22, 2024
014a18c
docs: sync current analytics docs
0xHieu01 Feb 22, 2024
a859534
docs: scaffold growth & marketing pages (#1941)
0xHieu01 Feb 22, 2024
56be774
feat: revamp system monitor (#2097)
urmauur Feb 22, 2024
da298ac
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 22, 2024
cb10983
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 22, 2024
64ee25b
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 22, 2024
8f6b9b5
docs: hide incomplete roadmap page
0xHieu01 Feb 22, 2024
a790209
fix typo
0xHieu01 Feb 22, 2024
7ce0a13
revert content & remove sidebar only
0xHieu01 Feb 22, 2024
451459c
Merge branch 'dev' into docs-hide-incomplete-pages
0xHieu01 Feb 22, 2024
1248593
feat: sync website footer with about page
0xHieu01 Feb 22, 2024
18c9837
Merge branch 'docs-hide-incomplete-pages' of https://github.com/janhq…
0xHieu01 Feb 22, 2024
941667e
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Feb 22, 2024
bddb957
docs: hide incomplete pages (#2127)
0xHieu01 Feb 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "jan",
"image": "node:20"
}
"name": "jan",
"image": "node:20"
}
1 change: 1 addition & 0 deletions .github/workflows/jan-electron-linter-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Jan Electron Linter & Test
on:
workflow_dispatch:
push:
branches:
- main
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/jan-server-build-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Jan Build Docker Nightly or Manual

on:
push:
branches:
- main
- feature/helmchart-and-ci-jan-server
paths-ignore:
- 'README.md'
- 'docs/**'
schedule:
- cron: '0 20 * * 1,2,3' # At 8 PM UTC on Monday, Tuesday, and Wednesday which is 3 AM UTC+7 Tuesday, Wednesday, and Thursday
workflow_dispatch:

jobs:
# Job create Update app version based on latest release tag with build number and save to output
get-update-version:
uses: ./.github/workflows/template-get-update-version.yml

build-cpu:
uses: ./.github/workflows/template-build-jan-server.yml
permissions:
packages: write
secrets: inherit
needs: [get-update-version]
with:
dockerfile_path: ./Dockerfile
docker_image_tag: "ghcr.io/janhq/jan-server:dev-cpu-latest,ghcr.io/janhq/jan-server:dev-cpu-${{ needs.get-update-version.outputs.new_version }}"

build-gpu:
uses: ./.github/workflows/template-build-jan-server.yml
permissions:
packages: write
secrets: inherit
needs: [get-update-version]
with:
dockerfile_path: ./Dockerfile.gpu
docker_image_tag: "ghcr.io/janhq/jan-server:dev-cuda-12.2-latest,ghcr.io/janhq/jan-server:dev-cuda-12.2-${{ needs.get-update-version.outputs.new_version }}"


30 changes: 30 additions & 0 deletions .github/workflows/jan-server-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Jan Build Docker

on:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+"]

jobs:
# Job create Update app version based on latest release tag with build number and save to output
get-update-version:
uses: ./.github/workflows/template-get-update-version.yml

build-cpu:
permissions:
packages: write
uses: ./.github/workflows/template-build-jan-server.yml
secrets: inherit
needs: [get-update-version]
with:
dockerfile_path: ./Dockerfile
docker_image_tag: "ghcr.io/janhq/jan-server:cpu-latest,ghcr.io/janhq/jan-server:cpu-${{ needs.get-update-version.outputs.new_version }}"

build-gpu:
permissions:
packages: write
uses: ./.github/workflows/template-build-jan-server.yml
secrets: inherit
needs: [get-update-version]
with:
dockerfile_path: ./Dockerfile.gpu
docker_image_tag: "ghcr.io/janhq/jan-server:cuda-12.2-latest,ghcr.io/janhq/jan-server:cuda-12.2-${{ needs.get-update-version.outputs.new_version }}"
39 changes: 39 additions & 0 deletions .github/workflows/template-build-jan-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build-jan-server
on:
workflow_call:
inputs:
dockerfile_path:
required: false
type: string
default: './Dockerfile'
docker_image_tag:
required: true
type: string
default: 'ghcr.io/janhq/jan-server:dev-latest'

jobs:
build:
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
IMAGE_NAME: janhq/jan-server
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ${{ inputs.dockerfile_path }}
push: true
tags: ${{ inputs.docker_image_tag }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
error.log
node_modules
*.tgz
!charts/server/charts/*.tgz
yarn.lock
dist
build
Expand All @@ -28,4 +29,5 @@ extensions/inference-nitro-extension/bin/*/*.exp
extensions/inference-nitro-extension/bin/*/*.lib
extensions/inference-nitro-extension/bin/saved-*
extensions/inference-nitro-extension/bin/*.tar.gz

extensions/inference-nitro-extension/bin/vulkaninfoSDK.exe
extensions/inference-nitro-extension/bin/vulkaninfo
File renamed without changes.
File renamed without changes.
70 changes: 46 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,61 @@
FROM node:20-bullseye AS base
FROM node:20-bookworm AS base

# 1. Install dependencies only when needed
FROM base AS deps
FROM base AS builder

# Install g++ 11
RUN apt update && apt install -y gcc-11 g++-11 cpp-11 jq xsel && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN yarn install
COPY . ./

# # 2. Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# This will do the trick, use the corresponding env file for each environment.
RUN yarn workspace server install
RUN yarn server:prod
RUN export NITRO_VERSION=$(cat extensions/inference-nitro-extension/bin/version.txt) && \
jq --arg nitroVersion $NITRO_VERSION '(.scripts."downloadnitro:linux" | gsub("\\${NITRO_VERSION}"; $nitroVersion)) | gsub("\r"; "")' extensions/inference-nitro-extension/package.json > /tmp/newcommand.txt && export NEW_COMMAND=$(sed 's/^"//;s/"$//' /tmp/newcommand.txt) && jq --arg newCommand "$NEW_COMMAND" '.scripts."downloadnitro:linux" = $newCommand' extensions/inference-nitro-extension/package.json > /tmp/package.json && mv /tmp/package.json extensions/inference-nitro-extension/package.json
RUN make install-and-build

# 3. Production image, copy all the files and run next
# # 2. Rebuild the source code only when needed
FROM base AS runner

# Install g++ 11
RUN apt update && apt install -y gcc-11 g++-11 cpp-11 jq xsel && rm -rf /var/lib/apt/lists/*

WORKDIR /app

ENV NODE_ENV=production
# Copy the package.json and yarn.lock of root yarn space to leverage Docker cache
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/node_modules ./node_modules/
COPY --from=builder /app/yarn.lock ./yarn.lock

# Copy the package.json, yarn.lock, and build output of server yarn space to leverage Docker cache
COPY --from=builder /app/core ./core/
COPY --from=builder /app/server ./server/
RUN cd core && yarn install && yarn run build
RUN yarn workspace @janhq/server install && yarn workspace @janhq/server build
COPY --from=builder /app/docs/openapi ./docs/openapi/

# Copy pre-install dependencies
COPY --from=builder /app/pre-install ./pre-install/

# Copy the package.json, yarn.lock, and output of web yarn space to leverage Docker cache
COPY --from=builder /app/uikit ./uikit/
COPY --from=builder /app/web ./web/
COPY --from=builder /app/models ./models/

RUN yarn workspace @janhq/uikit install && yarn workspace @janhq/uikit build
RUN yarn workspace jan-web install

RUN npm install -g serve@latest

# RUN addgroup -g 1001 -S nodejs;
COPY --from=builder /app/server/build ./
EXPOSE 1337 3000 3928

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder /app/server/node_modules ./node_modules
COPY --from=builder /app/server/package.json ./package.json
ENV JAN_API_HOST 0.0.0.0
ENV JAN_API_PORT 1337

EXPOSE 4000 3928
ENV API_BASE_URL http://localhost:1337

ENV PORT 4000
ENV APPDATA /app/data
CMD ["sh", "-c", "export NODE_ENV=production && yarn workspace jan-web build && cd web && npx serve out & cd server && node build/main.js"]

CMD ["node", "main.js"]
# docker build -t jan .
# docker run -p 1337:1337 -p 3000:3000 -p 3928:3928 jan
88 changes: 88 additions & 0 deletions Dockerfile.gpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Please change the base image to the appropriate CUDA version base on NVIDIA Driver Compatibility
# Run nvidia-smi to check the CUDA version and the corresponding driver version
# Then update the base image to the appropriate CUDA version refer https://catalog.ngc.nvidia.com/orgs/nvidia/containers/cuda/tags

FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04 AS base

# 1. Install dependencies only when needed
FROM base AS builder

# Install g++ 11
RUN apt update && apt install -y gcc-11 g++-11 cpp-11 jq xsel curl gnupg make python3-dev && curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt install nodejs -y && rm -rf /var/lib/apt/lists/*

# Update alternatives for GCC and related tools
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 \
--slave /usr/bin/g++ g++ /usr/bin/g++-11 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-11 \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11 && \
update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-11 110

RUN npm install -g yarn

WORKDIR /app

# Install dependencies based on the preferred package manager
COPY . ./

RUN export NITRO_VERSION=$(cat extensions/inference-nitro-extension/bin/version.txt) && \
jq --arg nitroVersion $NITRO_VERSION '(.scripts."downloadnitro:linux" | gsub("\\${NITRO_VERSION}"; $nitroVersion)) | gsub("\r"; "")' extensions/inference-nitro-extension/package.json > /tmp/newcommand.txt && export NEW_COMMAND=$(sed 's/^"//;s/"$//' /tmp/newcommand.txt) && jq --arg newCommand "$NEW_COMMAND" '.scripts."downloadnitro:linux" = $newCommand' extensions/inference-nitro-extension/package.json > /tmp/package.json && mv /tmp/package.json extensions/inference-nitro-extension/package.json
RUN make install-and-build

# # 2. Rebuild the source code only when needed
FROM base AS runner

# Install g++ 11
RUN apt update && apt install -y gcc-11 g++-11 cpp-11 jq xsel curl gnupg make python3-dev && curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get install nodejs -y && rm -rf /var/lib/apt/lists/*

# Update alternatives for GCC and related tools
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 \
--slave /usr/bin/g++ g++ /usr/bin/g++-11 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-11 \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11 && \
update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-11 110

RUN npm install -g yarn

WORKDIR /app

# Copy the package.json and yarn.lock of root yarn space to leverage Docker cache
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/node_modules ./node_modules/
COPY --from=builder /app/yarn.lock ./yarn.lock

# Copy the package.json, yarn.lock, and build output of server yarn space to leverage Docker cache
COPY --from=builder /app/core ./core/
COPY --from=builder /app/server ./server/
RUN cd core && yarn install && yarn run build
RUN yarn workspace @janhq/server install && yarn workspace @janhq/server build
COPY --from=builder /app/docs/openapi ./docs/openapi/

# Copy pre-install dependencies
COPY --from=builder /app/pre-install ./pre-install/

# Copy the package.json, yarn.lock, and output of web yarn space to leverage Docker cache
COPY --from=builder /app/uikit ./uikit/
COPY --from=builder /app/web ./web/
COPY --from=builder /app/models ./models/

RUN yarn workspace @janhq/uikit install && yarn workspace @janhq/uikit build
RUN yarn workspace jan-web install

RUN npm install -g serve@latest

EXPOSE 1337 3000 3928

ENV LD_LIBRARY_PATH=/usr/local/cuda/targets/x86_64-linux/lib:/usr/local/cuda-12.0/compat${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

ENV JAN_API_HOST 0.0.0.0
ENV JAN_API_PORT 1337

ENV API_BASE_URL http://localhost:1337

CMD ["sh", "-c", "export NODE_ENV=production && yarn workspace jan-web build && cd web && npx serve out & cd server && node build/main.js"]

# pre-requisites: nvidia-docker
# docker build -t jan-gpu . -f Dockerfile.gpu
# docker run -p 1337:1337 -p 3000:3000 -p 3928:3928 --gpus all jan-gpu
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ endif

check-file-counts: install-and-build
ifeq ($(OS),Windows_NT)
powershell -Command "if ((Get-ChildItem -Path electron/pre-install -Filter *.tgz | Measure-Object | Select-Object -ExpandProperty Count) -ne (Get-ChildItem -Path extensions -Directory | Measure-Object | Select-Object -ExpandProperty Count)) { Write-Host 'Number of .tgz files in electron/pre-install does not match the number of subdirectories in extension'; exit 1 } else { Write-Host 'Extension build successful' }"
powershell -Command "if ((Get-ChildItem -Path pre-install -Filter *.tgz | Measure-Object | Select-Object -ExpandProperty Count) -ne (Get-ChildItem -Path extensions -Directory | Measure-Object | Select-Object -ExpandProperty Count)) { Write-Host 'Number of .tgz files in pre-install does not match the number of subdirectories in extension'; exit 1 } else { Write-Host 'Extension build successful' }"
else
@tgz_count=$$(find electron/pre-install -type f -name "*.tgz" | wc -l); dir_count=$$(find extensions -mindepth 1 -maxdepth 1 -type d | wc -l); if [ $$tgz_count -ne $$dir_count ]; then echo "Number of .tgz files in electron/pre-install ($$tgz_count) does not match the number of subdirectories in extension ($$dir_count)"; exit 1; else echo "Extension build successful"; fi
@tgz_count=$$(find pre-install -type f -name "*.tgz" | wc -l); dir_count=$$(find extensions -mindepth 1 -maxdepth 1 -type d | wc -l); if [ $$tgz_count -ne $$dir_count ]; then echo "Number of .tgz files in pre-install ($$tgz_count) does not match the number of subdirectories in extension ($$dir_count)"; exit 1; else echo "Extension build successful"; fi
endif

dev: check-file-counts
Expand All @@ -52,18 +52,28 @@ build: check-file-counts

clean:
ifeq ($(OS),Windows_NT)
powershell -Command "Get-ChildItem -Path . -Include node_modules, .next, dist -Recurse -Directory | Remove-Item -Recurse -Force"
powershell -Command "Get-ChildItem -Path . -Include node_modules, .next, dist, build, out -Recurse -Directory | Remove-Item -Recurse -Force"
powershell -Command "Remove-Item -Recurse -Force ./pre-install/*.tgz"
powershell -Command "Remove-Item -Recurse -Force ./electron/pre-install/*.tgz"
rmdir /s /q "%USERPROFILE%\jan\extensions"
else ifeq ($(shell uname -s),Linux)
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
find . -name ".next" -type d -exec rm -rf '{}' +
find . -name "dist" -type d -exec rm -rf '{}' +
find . -name "build" -type d -exec rm -rf '{}' +
find . -name "out" -type d -exec rm -rf '{}' +
rm -rf ./pre-install/*.tgz
rm -rf ./electron/pre-install/*.tgz
rm -rf "~/jan/extensions"
rm -rf "~/.cache/jan*"
else
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
find . -name ".next" -type d -exec rm -rf '{}' +
find . -name "dist" -type d -exec rm -rf '{}' +
find . -name "build" -type d -exec rm -rf '{}' +
find . -name "out" -type d -exec rm -rf '{}' +
rm -rf ./pre-install/*.tgz
rm -rf ./electron/pre-install/*.tgz
rm -rf ~/jan/extensions
rm -rf ~/Library/Caches/jan*
endif
Loading
Loading