Merge pull request #340 from Monadical-SAS/updated-documentation

Updated documentation
This commit is contained in:
Andreas Bonini
2023-12-18 21:17:35 +07:00
committed by GitHub
5 changed files with 77 additions and 49 deletions

1
.python-version Normal file
View File

@@ -0,0 +1 @@
3.11.6

View File

@@ -67,18 +67,11 @@ To install the application, run:
```bash ```bash
yarn install yarn install
``` cp .env_template .env
Then create an `.env` with: cp config-template.ts config.ts
```
FIEF_URL=https://auth.reflector-ui.dev/reflector-local
FIEF_CLIENT_ID=s03<omitted>
FIEF_CLIENT_SECRET=<omitted>
EDGE_CONFIG=<omitted> (optional)
``` ```
Then copy config-template.ts to a new file called config.ts, this is where you will configure the features or your local project. Then, fill in the environment variables in `.env` and the configuration in `config.ts` as needed. If you are unsure on how to proceed, ask in Zulip.
### Run the Application ### Run the Application
@@ -88,7 +81,7 @@ To run the application in development mode, run:
yarn dev yarn dev
``` ```
Then open [http://localhost:3000](http://localhost:3000) to view it in the browser. Then (after completing server setup and starting it) open [http://localhost:3000](http://localhost:3000) to view it in the browser.
### OpenAPI Code Generation ### OpenAPI Code Generation
@@ -106,59 +99,76 @@ Start with `cd server`.
### Installation ### Installation
Download [Python 3.11 from the official website](https://www.python.org/downloads/) and ensure you have version 3.11 by running `python --version`.
Run: Run:
```bash ```bash
poetry install python --version # It should say 3.11
pip install poetry
poetry install --no-root
cp .env_template .env
``` ```
Then create an `.env` with: Then fill `.env` with the omitted values (ask in Zulip). At the moment of this writing, the only value omitted is `AUTH_FIEF_CLIENT_SECRET`.
```
TRANSCRIPT_BACKEND=modal
TRANSCRIPT_URL=https://monadical-sas--reflector-transcriber-web.modal.run
TRANSCRIPT_MODAL_API_KEY=<omitted>
LLM_BACKEND=modal
LLM_URL=https://monadical-sas--reflector-llm-web.modal.run
LLM_MODAL_API_KEY=<omitted>
TRANSLATE_URL=https://monadical-sas--reflector-translator-web.modal.run
ZEPHYR_LLM_URL=https://monadical-sas--reflector-llm-zephyr-web.modal.run
DIARIZATION_URL=https://monadical-sas--reflector-diarizer-web.modal.run
AUTH_BACKEND=fief
AUTH_FIEF_URL=https://auth.reflector.media/reflector-local
AUTH_FIEF_CLIENT_ID=KQzRsNgoY<omitted>
AUTH_FIEF_CLIENT_SECRET=<omitted>
TRANSLATE_URL=https://monadical-sas--reflector-translator-web.modal.run
ZEPHYR_LLM_URL=https://monadical-sas--reflector-llm-zephyr-web.modal.run
```
### Start the API/Backend ### Start the API/Backend
Start the API server:
```bash
poetry run python3 -m reflector.app
```
Start the background worker: Start the background worker:
```bash ```bash
celery -A reflector.worker.app worker --loglevel=info poetry run celery -A reflector.worker.app worker --loglevel=info
``` ```
Redis (mac specific command): ### Redis (Mac)
```bash ```bash
yarn add redis
redis-server redis-server
``` ```
### Redis (Windows)
**Option 1**
```bash
docker compose up -d redis
```
**Option 2**
Install:
- [Git for Windows](https://gitforwindows.org/)
- [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install)
- Install your preferred Linux distribution via the Microsoft Store (e.g., Ubuntu).
Open your Linux distribution and update the package list:
```bash
sudo apt update
sudo apt install redis-server
redis-server
```
## Update the database schema (run on first install, and after each pull containing a migration)
```bash
poetry run python alembic head
```
## Main Server
Start the server:
```bash
poetry run python -m reflector.app
```
### Crontab (optional)
For crontab (only healthcheck for now), start the celery beat (you don't need it on your local dev environment): For crontab (only healthcheck for now), start the celery beat (you don't need it on your local dev environment):
```bash ```bash
celery -A reflector.worker.app beat poetry run celery -A reflector.worker.app beat
``` ```
#### Using docker #### Using docker

20
server/.env_template Normal file
View File

@@ -0,0 +1,20 @@
TRANSCRIPT_BACKEND=modal
TRANSCRIPT_URL=https://monadical-sas--reflector-transcriber-web.modal.run
TRANSCRIPT_MODAL_API_KEY=***REMOVED***
LLM_BACKEND=modal
LLM_URL=https://monadical-sas--reflector-llm-web.modal.run
LLM_MODAL_API_KEY=<ask in zulip>
AUTH_BACKEND=fief
AUTH_FIEF_URL=https://auth.reflector.media/reflector-local
AUTH_FIEF_CLIENT_ID=***REMOVED***
AUTH_FIEF_CLIENT_SECRET=<ask in zulip> <-----------------------------------------------------------------------------------------
TRANSLATE_URL=https://monadical-sas--reflector-translator-web.modal.run
ZEPHYR_LLM_URL=https://monadical-sas--reflector-llm-zephyr-web.modal.run
DIARIZATION_URL=https://monadical-sas--reflector-diarizer-web.modal.run
BASE_URL=https://xxxxx.ngrok.app
DIARIZATION_ENABLED=false

View File

@@ -1 +1 @@
3.11 3.11.6

View File

@@ -1,5 +1,2 @@
FIEF_URL=https://auth.reflector-ui.dev/reflector-local FIEF_CLIENT_SECRET=<omitted, ask in zulip>
FIEF_CLIENT_ID=s03<omitted> ZULIP_API_KEY=<omitted, ask in zulip>
FIEF_CLIENT_SECRET=<omitted>
EDGE_CONFIG=<omitted>