Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added option to specify platform for db in compose #2725

Merged
merged 2 commits into from
Apr 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ if you have problems):
docker compose --profile ci up --build --attach-dependencies
```

> **Note:** when running on MacOS with an M1 chip you have to use:
> `DB_PLATFORM=linux/x86_64 docker compose ...`

Then, navigate to `http://localhost:3000` (It may take some time to boot up) and
interact with the website.

Expand Down
3 changes: 3 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ database at `localhost:5432`. (See
[FAQ](https://projects.laion.ai/Open-Assistant/docs/faq#enable-dockers-buildkit-backend)
if you face any docker problems).

> **Note:** when running on MacOS with an M1 chip you have to use:
> `DB_PLATFORM=linux/x86_64 docker compose ...`

Python 3.10 is required. It is recommended to use `pyenv` which will recognise
the `.python-version` in the project root directory.

Expand Down
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:

# This DB is for the FastAPI Backend.
db:
platform: "${DB_PLATFORM:-}"
image: ghcr.io/laion-ai/open-assistant/oasst-postgres
pull_policy: always
restart: always
Expand Down
3 changes: 3 additions & 0 deletions scripts/backend-development/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ In root directory, run
a database. The default settings are already configured to connect to the
database at `localhost:5432`.

> **Note:** when running on MacOS with an M1 chip you have to use:
> `DB_PLATFORM=linux/x86_64 docker compose ...`

Make sure you have all requirements installed. You can do this by running
`pip install -r requirements.txt` inside the `backend` folder,
`pip install -e .` inside the `oasst-shared` folder and `pip install -e .`
Expand Down
1 change: 1 addition & 0 deletions website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ If you're doing active development we suggest the following workflow:
1. Run `npm run dev`. Now the website is up and running locally at `http://localhost:3000`.
1. To create an account, login via the user using email authentication and navigate to `http://localhost:1080`. Check
the email listed and click the log in link. You're now logged in and authenticated.
> **Note:** when running on MacOS with an M1 chip you have to use: `DB_PLATFORM=linux/x86_64 docker compose ...`

### Using debug user credentials

Expand Down