29 lines
922 B
Bash
Raw Permalink Normal View History

2024-06-26 16:01:41 -04:00
#!/bin/bash
################################
### Docker configuration ###
################################
sudo chmod 666 /var/run/docker.sock
################################
### Dependency configuration ###
################################
# Install graphrag dependencies
# 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
ROOT_DIR=/graphrag-accelerator
cd ${ROOT_DIR}
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 ###
#########################
git config --global --add safe.directory ${ROOT_DIR}
2024-06-26 16:01:41 -04:00
pre-commit install