2024-06-26 16:01:41 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
################################
|
|
|
|
### Docker configuration ###
|
|
|
|
################################
|
|
|
|
sudo chmod 666 /var/run/docker.sock
|
|
|
|
|
|
|
|
################################
|
|
|
|
### Dependency configuration ###
|
|
|
|
################################
|
|
|
|
|
|
|
|
# Install graphrag dependencies
|
2024-12-05 14:31:10 -05:00
|
|
|
# NOTE: temporarily copy the pyproject.toml and poetry.lock files to the root directory to install dependencies.
|
|
|
|
# This avoids having a .venv folder in the backend directory, which causes PATH issues when building the
|
|
|
|
# backend docker image during deployment
|
2024-12-04 15:01:44 -05:00
|
|
|
ROOT_DIR=/graphrag-accelerator
|
|
|
|
cd ${ROOT_DIR}
|
2024-12-05 14:31:10 -05:00
|
|
|
cp ${ROOT_DIR}/backend/pyproject.toml ${ROOT_DIR}
|
|
|
|
cp ${ROOT_DIR}/backend/poetry.lock ${ROOT_DIR}
|
|
|
|
poetry install --no-interaction -v
|
|
|
|
rm ${ROOT_DIR}/pyproject.toml
|
|
|
|
rm ${ROOT_DIR}/poetry.lock
|
2024-06-26 16:01:41 -04:00
|
|
|
|
|
|
|
#########################
|
|
|
|
### Git configuration ###
|
|
|
|
#########################
|
2024-12-04 15:01:44 -05:00
|
|
|
git config --global --add safe.directory ${ROOT_DIR}
|
2024-06-26 16:01:41 -04:00
|
|
|
pre-commit install
|