* feat: desktop revamp * feat: refactor system monitor * fix linter CI * remove unused import component * added responsive and resizeable component * responsive and resizeable local server page * finalize responsive and resizeable component * fix scroll custom ui * remove react scroll to bottom from modal troubleshoot * fix modal troubleshoot ui * fix setting gpu list * text area custom scroll bar * fix padding message input * cleanup classname * update inference engine model dropdown * update loader style * update quick ask ui * prepare theme provider * update dark theme * remove update hotkey list model and navigation * fix: cleanup hardcode classname * fix: update feedback * Set native theme electron * update destop ui revamp from feedback * update button icon component insider icon chat input message * update model dropdown ui * update tranaparent baclground * update logo model provider * fix: set background material acrylic support to blur background windows * fix: update tranparent left and right panel * fix: linter CI * update app using frameless window * styling custom style minimize, maximize and close app * temporary hidden maximize window * fix: responsive left and right panel * fix: enable click outside when leftpanel responsive * fix: remove unused import * update transparent variable css windows * fix: ui import model * feat: Support Theme system (#2946) * feat: update support theme system * update select component * feat: add theme folder in root project * fix: padding left and right center panel * fix: update padding left and right * chore: migrate themes * fix: rmdirsync error * chore: update gitignore * fix: cp recursive * fix: files electron package json * fix: migration * fix: update fgit ignore --------- Co-authored-by: Louis <louis@jan.ai> * fix: update feedback missing state when refrash app * fix: error test CI * chore: refactor useLoadThemes * chore: cleanup unused vars * fix: revert back menubar windows * fix minor ui * fix: minor ui --------- Co-authored-by: Louis <louis@jan.ai>
61 lines
2.4 KiB
Docker
61 lines
2.4 KiB
Docker
FROM node:20-bookworm 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 && rm -rf /var/lib/apt/lists/*
|
|
|
|
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 && rm -rf /var/lib/apt/lists/*
|
|
|
|
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/joi ./joi/
|
|
COPY --from=builder /app/web ./web/
|
|
|
|
RUN yarn workspace @janhq/joi install && yarn workspace @janhq/joi build
|
|
RUN yarn workspace @janhq/web install
|
|
|
|
RUN npm install -g serve@latest
|
|
|
|
EXPOSE 1337 3000 3928
|
|
|
|
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 @janhq/web build && cd web && npx serve out & cd server && node build/main.js"]
|
|
|
|
# docker build -t jan .
|
|
# docker run -p 1337:1337 -p 3000:3000 -p 3928:3928 jan
|