Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit d856ab4

Browse files
authored
Merge branch 'dev' into copyfix
2 parents dd2fcfb + 00af979 commit d856ab4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1860
-325
lines changed

docker/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM ubuntu:22.04 as base
22

33
FROM base as build
44

5+
ARG CORTEX_CPP_VERSION=latest
6+
57
ENV DEBIAN_FRONTEND=noninteractive
68

79
# Install dependencies
@@ -41,9 +43,11 @@ RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/nul
4143

4244
WORKDIR /app
4345

44-
COPY . /app/
46+
COPY ./engine /app/engine
47+
48+
COPY ./docs/static/openapi/cortex.json /app/docs/static/openapi/cortex.json
4549

46-
RUN git submodule update --init && cd engine && make configure-vcpkg && make build CMAKE_EXTRA_FLAGS="-DCORTEX_CPP_VERSION=$(git rev-parse HEAD) -DCMAKE_BUILD_TEST=OFF -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
50+
RUN cd engine && make configure-vcpkg && make build CMAKE_EXTRA_FLAGS="-DCORTEX_CPP_VERSION=${CORTEX_CPP_VERSION} -DCMAKE_BUILD_TEST=OFF -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake"
4751

4852
FROM base as runtime
4953

@@ -74,6 +78,8 @@ RUN chmod +x /tmp/download-cortex.llamacpp.sh && /bin/bash /tmp/download-cortex.
7478
# Copy the entrypoint script
7579
COPY ./docker/entrypoint.sh /usr/local/bin/entrypoint.sh
7680

81+
RUN chmod +x /usr/local/bin/entrypoint.sh
82+
7783
EXPOSE 39281
7884

7985
HEALTHCHECK --interval=300s --timeout=30s --start-period=10s --retries=3 \

docker/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ This guide will help you set up and run Cortex using Docker.
1010
1. Clone the Cortex repository
1111
```bash
1212
git clone https://github.com/janhq/cortex.cpp.git
13-
14-
cd cortex.cpp/docker
13+
cd cortex.cpp
14+
git submodule update --init
1515
```
1616
2. Build the Docker image
1717
```bash
1818
# Default always uses the latest cortex.cpp and cortex.llamacpp
19-
docker build -t cortex .
19+
docker build -t cortex --build-arg CORTEX_CPP_VERSION=$(git rev-parse HEAD) -f docker/Dockerfile .
2020
2121
# Use specific version of cortex.cpp and cortex.llamacpp
22-
docker build --build-arg CORTEX_LLAMACPP_VERSION=0.1.34 -t cortex .
22+
docker build --build-arg CORTEX_LLAMACPP_VERSION=0.1.34 --build-arg CORTEX_CPP_VERSION=$(git rev-parse HEAD) -t cortex -f docker/Dockerfile .
2323
```
2424

2525
3. Run the Docker container
@@ -45,4 +45,4 @@ This guide will help you set up and run Cortex using Docker.
4545
```bash
4646
docker exec -it cortex bash
4747
cortex --help
48-
```
48+
```

docs/docusaurus.config.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const formattedDate = `${month}-${day}-${year}`;
2020

2121
async function fetchDataDaily(date: string) {
2222
const response = await fetch(
23-
`https://delta.jan.ai/openai-api-collection-test/${date}.json`,
23+
`https://delta.jan.ai/openai-api-collection-test/${date}.json`
2424
);
2525
if (!response.ok) {
2626
return {};
@@ -120,7 +120,7 @@ const config: Config = {
120120
try {
121121
let refs = {};
122122
const response = await fetch(
123-
`https://huggingface.co/api/models/${model.name}/refs`,
123+
`https://huggingface.co/api/models/${model.name}/refs`
124124
);
125125
refs = await response.json();
126126
fetchedModels.push({
@@ -153,7 +153,7 @@ const config: Config = {
153153
path: `/models/${page.name.replace("cortexso/", "")}`,
154154
// the page component used to render the page
155155
component: require.resolve(
156-
"./src/components/MyModelPage/index.tsx",
156+
"./src/components/MyModelPage/index.tsx"
157157
),
158158
// will only match for exactly matching paths
159159
exact: true,
@@ -164,7 +164,7 @@ const config: Config = {
164164
// in this case, we merge the page data together with the loaded content data
165165
customData: { ...page },
166166
});
167-
}),
167+
})
168168
);
169169
} catch (error) {
170170
console.error("Error fetching models:", error);
@@ -201,7 +201,7 @@ const config: Config = {
201201
changelog.sort(
202202
(a, b) =>
203203
new Date(b.frontmatter.date).getTime() -
204-
new Date(a.frontmatter.date).getTime(),
204+
new Date(a.frontmatter.date).getTime()
205205
);
206206
setGlobalData(changelog);
207207
},
@@ -214,7 +214,7 @@ const config: Config = {
214214
async contentLoaded({ content, actions }) {
215215
const { setGlobalData } = actions;
216216
const fetchRepoInfo = await fetch(
217-
"https://api.github.com/repos/janhq/cortex.cpp",
217+
"https://api.github.com/repos/janhq/cortex.cpp"
218218
);
219219
const repoInfo = await fetchRepoInfo.json();
220220
setGlobalData(repoInfo);
@@ -227,7 +227,7 @@ const config: Config = {
227227
async contentLoaded({ content, actions }) {
228228
const { setGlobalData } = actions;
229229
const fetchLatestRelease = await fetch(
230-
"https://api.github.com/repos/janhq/cortex.cpp/releases/latest",
230+
"https://api.github.com/repos/janhq/cortex.cpp/releases/latest"
231231
);
232232
const latestRelease = await fetchLatestRelease.json();
233233
setGlobalData(latestRelease);
@@ -240,7 +240,7 @@ const config: Config = {
240240
async contentLoaded({ content, actions }) {
241241
const { setGlobalData } = actions;
242242
const fetchTotalCoverage = await fetch(
243-
"https://delta.jan.ai/openai-api-collection-test/total-coverage.json",
243+
"https://delta.jan.ai/openai-api-collection-test/total-coverage.json"
244244
);
245245
const totalCoverage = await fetchTotalCoverage.json();
246246
setGlobalData(totalCoverage);
@@ -410,6 +410,7 @@ const config: Config = {
410410
items: [
411411
{ to: "/models", label: "Models", position: "left" },
412412
{ to: "/changelog", label: "Changelog", position: "left" },
413+
{ to: "/contact", label: "Enterprise", position: "left" },
413414
{
414415
type: "doc",
415416
position: "right",

docs/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@
1717
"typecheck": "tsc"
1818
},
1919
"dependencies": {
20+
"@calcom/embed-react": "^1.5.1",
2021
"@code-hike/mdx": "^0.9.0",
2122
"@docsearch/js": "^3.6.0",
2223
"@docsearch/react": "^3.6.0",
23-
"@docusaurus/core": "3.4.0",
24-
"@docusaurus/preset-classic": "^3.4.0",
25-
"@docusaurus/theme-live-codeblock": "^3.4.0",
26-
"@docusaurus/theme-mermaid": "^3.4.0",
24+
"@docusaurus/core": "^3.5.2",
25+
"@docusaurus/preset-classic": "^3.5.2",
26+
"@docusaurus/theme-live-codeblock": "^3.5.2",
27+
"@docusaurus/theme-mermaid": "^3.5.2",
2728
"@excalidraw/excalidraw": "^0.17.6",
2829
"@huggingface/hub": "^0.15.1",
2930
"@mdx-js/react": "3.0.1",

docs/src/components/Announcement/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ const Announcement = () => {
55
<div className="inline-flex items-center justify-center alert px-4 py-3 rounded-xl mx-auto bg-indigo-500 border border-solid border-indigo-800">
66
{/* Please change this when cortex stable we can use from latest release endpoint */}
77
<div className="flex items-center gap-2">
8-
<span>🚧</span>
8+
<span>🎉</span>
99
<p className="mb-0 text-neutral-100 font-medium">
10-
Cortex.cpp v1.0 is now live on github.
11-
<a href="/docs" className="no-underline hover:no-underline">
10+
<a href="https://github.com/janhq/cortex.cpp/releases/tag/v1.0.1" className="no-underline hover:no-underline">
1211
{" "}
13-
Read more
12+
Cortex.cpp v1.0 is now live on GitHub. Check it out!
1413
</a>
1514
</p>
1615
</div>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import Cal, { getCalApi } from "@calcom/embed-react";
2+
import { useEffect } from "react";
3+
export default function MyApp() {
4+
useEffect(()=>{
5+
(async function () {
6+
const cal = await getCalApi({"namespace":"cortex"});
7+
cal("ui", {"styles":{"branding":{"brandColor":"#000000"}},"hideEventTypeDetails":false,"layout":"month_view"});
8+
})();
9+
}, [])
10+
return <Cal namespace="cortex"
11+
calLink="team/homebrew/cortex"
12+
style={{width:"100%",height:"100%",overflow:"scroll"}}
13+
config={{"layout":"month_view"}}
14+
15+
16+
/>;
17+
};
18+

docs/src/containers/Homepage/SimpleHeroSection/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ const SimpleHeroSection = () => {
2828

2929
<div className="mt-8 flex gap-8 justify-center items-center">
3030
<DropdownDownload lastRelease={latestRelease} />
31-
<Link href="/docs/quickstart" target="_blank">
32-
<Button theme="secondary">Documentation</Button>
31+
<Link href="/contact" target="_blank">
32+
<Button theme="secondary">Schedule a Call</Button>
3333
</Link>
3434
</div>
3535
</div>

docs/src/pages/contact.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "Cortex Enterprise"
3+
description: "Cortex lets you run AI models locally on your device or server, enabling you to own your AI. For enterprise usage purposes, schedule a call with us here."
4+
---
5+
6+
import PartnerForm from '@site/src/components/PartnerForm';
7+
8+
<PartnerForm />

0 commit comments

Comments
 (0)