-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request janhq#6 from janhq/add_inference_sd_cpp
Add inference sd cpp
- Loading branch information
Showing
58 changed files
with
14,065 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
KEYCLOAK_VERSION=22.0.0 | ||
POSTGRES_DB_NAME=your_db_name | ||
POSTGRES_PASSWORD=your_db_pw | ||
POSTGRES_USERNAME=your_db_username | ||
POSTGRES_PORT=your_db_port | ||
KC_DB_SCHEMA=public | ||
KEYCLOAK_ADMIN=your_keycloak_admin_username | ||
KEYCLOAK_ADMIN_PASSWORD=your_keycloak_admin_password | ||
|
||
# Inference | ||
## LLM | ||
MODEL_URL=https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/resolve/main/llama-2-7b-chat.ggmlv3.q4_1.bin | ||
LLM_MODEL_FILE=$(basename $MODEL_URL) | ||
|
||
## SD | ||
MODEL_URL=https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors | ||
SD_MODEL_FILE=$(basename $MODEL_URL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
.vscode | ||
.env | ||
|
||
# Jan inference | ||
jan-inference/llm/models/** | ||
jan-inference/llm/.env | ||
jan-inference/llm/.env | ||
|
||
jan-inference/sd/models/** | ||
jan-inference/sd/output/** | ||
jan-inference/sd/.env | ||
jan-inference/sd/sd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "jan-inference/sd/sd_cpp"] | ||
path = jan-inference/sd/sd_cpp | ||
url = https://github.com/leejet/stable-diffusion.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
newadr: | ||
@echo "Initiating an ADR..." | ||
@read -p "Enter ADR number (e.g. 001): " number; \ | ||
read -p "Enter ADR title: " title; \ | ||
cp $(CURDIR)/adr/adr-template.md $(CURDIR)/adr/adr-$${number}-$${title}.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Architectural Decision Records (ADR) | ||
|
||
This is a repo of key architecture decisions for Jan. [Read more about ADRs](https://github.com/joelparkerhenderson/architecture-decision-record) | ||
|
||
|
||
### Get started: | ||
|
||
```sh | ||
# In root: | ||
make newadr | ||
``` | ||
|
||
### Template: | ||
- **Status**: `pending`, `approved`, or `rejected` | ||
- **Context**: a clearly defined problem/goal | ||
- **Decisions**: the proposed architecture choices & changes | ||
- **Consequences**: pros and cons of the decision | ||
- **References**: any relevant materials to read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# ADR {ADR-NUM}: {TITLE} | ||
|
||
## Changelog | ||
- {date}: {changelog} | ||
|
||
## Status | ||
|
||
What is the status, such as proposed, accepted, rejected, deprecated, superseded, etc.? | ||
|
||
{Proposed|Accepted|Rejected} | ||
|
||
## Context | ||
|
||
What is the issue that we're seeing that is motivating this decision or change? | ||
|
||
## Decision | ||
|
||
What is the change that we're proposing and/or doing? | ||
|
||
## Consequences | ||
|
||
What becomes easier or more difficult to do because of this change? | ||
|
||
## Reference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# docker version | ||
version: "3" | ||
|
||
volumes: | ||
keycloak_postgres_data: | ||
|
||
services: | ||
keycloak: | ||
image: quay.io/keycloak/keycloak:${KEYCLOAK_VERSION-22.0.0} | ||
command: start-dev | ||
environment: | ||
KC_DB: postgres | ||
KC_DB_URL_HOST: keycloak_postgres | ||
KC_DB_URL_DATABASE: ${POSTGRES_DB_NAME:-keycloak} | ||
KC_DB_PASSWORD: ${POSTGRES_PASSWORD:-postgres} | ||
KC_DB_USERNAME: ${POSTGRES_USERNAME:-postgres} | ||
KC_DB_SCHEMA: ${KC_DB_SCHEMA:-public} | ||
KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN-admin} | ||
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD-admin} | ||
ports: | ||
- "8080:8080" | ||
depends_on: | ||
keycloak_postgres: | ||
condition: service_healthy | ||
networks: | ||
jan_community: | ||
|
||
keycloak_postgres: | ||
image: postgres:13 | ||
command: postgres -c 'max_connections=200' && postgres -c 'shared_buffers=24MB' | ||
environment: | ||
# Environment Variables expecially for Postgres | ||
POSTGRES_DB: ${POSTGRES_DB_NAME:-keycloak} | ||
POSTGRES_USER: ${POSTGRES_USERNAME:-postgres} | ||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} | ||
PGDATA: /data/postgres | ||
PGPORT: ${POSTGRES_PORT:-5432} | ||
healthcheck: | ||
test: "exit 0" | ||
volumes: | ||
- keycloak_postgres_data:/data/postgres | ||
ports: | ||
- ${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432} | ||
networks: | ||
jan_community: | ||
|
||
keycloak_config_cli: | ||
image: adorsys/keycloak-config-cli:latest | ||
depends_on: | ||
- keycloak | ||
volumes: | ||
- ./conf/keycloak_conf:/config | ||
environment: | ||
KEYCLOAK_URL: http://keycloak:8080 | ||
KEYCLOAK_USER: ${KEYCLOAK_ADMIN-admin} | ||
KEYCLOAK_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD-admin} | ||
KEYCLOAK_AVAILABILITYCHECK_ENABLED: 'true' | ||
KEYCLOAK_AVAILABILITYCHECK_TIMEOUT: 120s | ||
IMPORT_FILES_LOCATIONS: '/config/*' | ||
DEBUG: 'true' | ||
|
||
networks: | ||
jan_community: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true yarn deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> yarn deploy | ||
``` | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
sidebar_position: 1 | ||
title: Overview | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Story | ||
--- | ||
|
||
TODO: a month by month recap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Team | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"label": "Company", | ||
"position": 2, | ||
"link": { | ||
"type": "generated-index" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: How We Work | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Team Structure | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"label": "Handbook", | ||
"position": 5, | ||
"link": { | ||
"type": "generated-index" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"label": "Roadmap", | ||
"position": 4, | ||
"link": { | ||
"type": "generated-index" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Roadmap | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: Mission & Vision | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: Customer Persona | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Business Model | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Brand | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: OKRs | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"label": "Strategy", | ||
"position": 3, | ||
"link": { | ||
"type": "generated-index" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Changelog | ||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Developer | ||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
sidebar_position: 1 | ||
slug: / | ||
--- | ||
|
||
# Getting Started | ||
Hi there |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Guides | ||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Reference | ||
TODO |
Oops, something went wrong.