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

Improvements to Windows setup documentation #161

Merged
merged 1 commit into from
May 30, 2024
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
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,17 @@ reset-db:
setup:
poetry install --with setup,community --verbose
poetry run python3 src/backend/cli/main.py
win-setup:
poetry install --with setup,community --verbose
poetry run python src/backend/cli/main.py
lint:
poetry run black .
poetry run isort .
first-run:
make setup
make migrate
make dev
win-first-run:
make win-setup
make migrate
make dev
28 changes: 21 additions & 7 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ make first-run
```

Follow the instructions to configure the model - either AWS Sagemaker, Bedrock, Azure, or Cohere's platform. This can also be done by running `make setup` (See Option 2 below), which will help generate a file for you, or by manually creating a `.env` file and copying the contents of the provided `.env-template`. Then replacing the values with the correct ones.
For Windows systems see the detailed setup below.

#### Detailed environment setup

Expand All @@ -29,42 +30,55 @@ Follow the instructions to configure the model - either AWS Sagemaker, Bedrock,

1. Install [docker](https://docs.docker.com/desktop/install/windows-install/)
2. Install [git]https://git-scm.com/download/win
3. In PowerShell (Terminal), install [scoop](https://scoop.sh/). After installing, run scoop bucket add extras
3. In PowerShell (Terminal), install [scoop](https://scoop.sh/). After installing, run the following commands:
```bash
scoop bucket add extras
```
4. Install pipx
```bash
scoop install pipx
pipx ensurepath
```
5. Install poetry >= 1.7.1 using
5. Install poetry == 1.7.1 using
```bash
pipx install poetry
pipx install poetry==1.7.1
```
6. Install miniconda using
```bash
scoop install miniconda3
conda init powershell
conda init cmd.exe
```
7. Restart PowerShell
8. Install the following:
```bash
scoop install postgresql
scoop install make
```
9. Create a new virtual environment with Python 3.11
9. Create a new virtual environment with Python 3.11 using CMD terminal
```bash
conda create -n toolkit python=3.11
conda activate toolkit
```
10. Clone the repo
11. Alternatively to `make first-run` or `make setup`, run
11. Alternatively to `make win-first-run` or `make win-setup`, run
```bash
poetry install --only setup --verbose
poetry install --with setup,community --verbose
poetry run python src/backend/cli/main.py
make migrate
make dev
```
12. Navigate to https://localhost:4000 in your browser

### Possible issues
- If you encounter on error on running `poetry install` related to `llama-cpp-python`, please run the following command:
```bash
poetry source add pypi
poetry source add llama-cpp-python https://abetlen.github.io/llama-cpp-python/whl/cpu
poetry lock
```
and then run the commands in step 11 again.
For more information and additional installation instructions, see [llama-cpp-python documentation](https://github.com/abetlen/llama-cpp-python)

</details>

<details>
Expand Down
Loading