diff --git a/Dockerfile_full b/Dockerfile.single similarity index 100% rename from Dockerfile_full rename to Dockerfile.single diff --git a/Makefile b/Makefile index 5a689d9..e3cd985 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ PLATFORMS=linux/amd64,linux/arm64 #,linux/arm/v7,linux/386 database: - docker compose up surrealdb + docker compose --profile db_only up run: poetry run streamlit run app_home.py diff --git a/README.md b/README.md index 7277bc3..44b0adf 100644 --- a/README.md +++ b/README.md @@ -109,40 +109,41 @@ Learn more about our project at [https://www.open-notebook.ai](https://www.open- Go to the [Setup Guide](docs/SETUP.md) to learn how to set up the tool in details. -To setup with Docker/Portainer: - -```yaml -version: '3' - -services: - surrealdb: - image: surrealdb/surrealdb:v2 - ports: - - "8000:8000" - volumes: - - surreal_data:/mydata - command: start --log trace --user root --pass root rocksdb:/mydata/mydatabase.db - pull_policy: always - user: root - - open_notebook: - image: lfnovo/open_notebook:latest - ports: - - "8080:8502" - env_file: - - ./docker.env - depends_on: - - surrealdb - pull_policy: always - -volumes: - surreal_data: - -``` - - +You don't need to clone this repo if you just want to use the app without building from source! Take a look at the [Open Notebook Boilerplate](https://github.com/lfnovo/open-notebook-boilerplate) repo with a sample of how to set it up for maximum feature usability. +### Running from source + +Start by cloning this repo and cd into it. + +```bash +git clone https://github.com/lfnovo/open-notebook +cd open-notebook +``` + +Rename `.env.example` into `.env` and set up your API keys. +Also, repeat the process for `docker.env` if you plan to run this using docker. + +```bash +cp .env.example .env +cp .env.example docker.env +``` + +Edit .env for your API keys. + +To run the source code locally and experiment with the code, you just need to run: + +```bash +poetry install +docker compose --profile db_only up +poetry run streamlit run app_home.py +``` + +If you don't want to mess around with the code and just want to run it as a docker image: + +```bash +docker compose --profile multi up +```

(back to top)

diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml deleted file mode 100644 index 77b28dc..0000000 --- a/docker-compose.dev.yml +++ /dev/null @@ -1,24 +0,0 @@ -version: '3' - -services: - surrealdb: - image: surrealdb/surrealdb:v2 - ports: - - "8000:8000" - volumes: - - ./.docker_data/surreal-data:/mydata - user: "${UID}:${GID}" - command: start --log trace --user root --pass root rocksdb:mydatabase.db - pull_policy: always - open_notebook: - build: - context: . - dockerfile: Dockerfile - ports: - - "8080:8502" - volumes: - - ./.docker_data/data:/app/data - - ./docker.env:/app/.env - - ./google-credentials.json:/app/google-credentials.json - depends_on: - - surrealdb diff --git a/docker-compose.full.yml b/docker-compose.full.yml deleted file mode 100644 index b6d2299..0000000 --- a/docker-compose.full.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: '3' - -services: - open_notebook_full: - build: - context: . - dockerfile: Dockerfile_full - ports: - - "8080:8502" - volumes: - - ./.docker_data/data:/app/data - - ./docker2.env:/app/.env - - ./google-credentials.json:/app/google-credentials.json diff --git a/docker-compose.yml b/docker-compose.yml index 3fb6369..46f68c4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,7 @@ -version: '3' - +# Instructions on how to use the different compose profiles +# 1. Run `docker compose --profile single up` to start the app and database on the same container +# 2. Run `docker compose --profile multi up` to start the multi container with app and database separate +# 3. Run `docker compose --profile db_only up` to start the database only -- useful if developing locally services: surrealdb: image: surrealdb/surrealdb:v2 @@ -10,7 +12,7 @@ services: command: start --log trace --user root --pass root rocksdb:/mydata/mydatabase.db pull_policy: always user: root - + profiles: [db_only, multi] open_notebook: image: lfnovo/open_notebook:latest ports: @@ -20,8 +22,21 @@ services: depends_on: - surrealdb pull_policy: always + profiles: [multi] volumes: - notebook_data:/app/data + open_notebook_single: + build: + context: . + dockerfile: Dockerfile.single + ports: + - "8080:8502" + profiles: + - single + volumes: + - ./.docker_data/data:/app/data + - ./docker2.env:/app/.env + - ./google-credentials.json:/app/google-credentials.json volumes: surreal_data: diff --git a/docs/SETUP.md b/docs/SETUP.md index ec46df9..dd2826c 100644 --- a/docs/SETUP.md +++ b/docs/SETUP.md @@ -78,6 +78,8 @@ Several new providers are supported now: - Vertex AI - Gemini - Ollama +- Groq +- xAI All providers are installed out of the box. All you need to do is to setup the environment variable configurations (API Keys, etc) for your selected provider and decide which models to use.