To install the Protein Graph Database on Ubuntu, follow these steps:
-
Clone the repository. To access the repo, you need to add your SSH key to your GitHub account. Refer to this guide for more information.
git clone [email protected]:BackofenLab/protein-graph-database.git cd protein-graph-database/
-
Install the required software, including Anaconda, Java, and Neo4j. Refer to Requirements.mk for details.
make requirements
-
Create the conda environment.
make env conda activate pgdb
To automate the download of dummy data from Google Drive and the insertion into the database, follow these steps:
-
Run the following command to set up the dummy data:
make dummydata
Executing the above command will seamlessly handle the installation of the gdown
tool, download the dummy data, and
insert it into the database.
Gdown
is a helper tool to automate the download from Google Drive.
To create a Neo4j account, follow these steps:
- Start Neo4j with the following command:
make neo4j
- Open localhost:7474 in your web browser.
- Login with the following credentials:
- Username: neo4j
- Password: neo4j
- Change the password to: pgdb.
- Login with the following credentials:
- Create the file
protein-graph-database/config.yml
- Insert the following content:
# Neo4j Database Credentials neo4j: host: "localhost" port: 7687 username: "neo4j" password: "pgdb"
- Download and install ollama:
curl -fsSL https://ollama.com/install.sh | sh
- Make sure ollama for python is installed:
pip install ollama
- Start ollama as a system:
sudo systemctl start ollama
- To check if ollama was correctly started and the gpu recognized check logs:
journalctl -e -u ollama
- Add environmental variables (such as the one to keep the model alive and loaded in memory):
sudo systemctl edit ollama.service
[Service] Environment="OLLAMA_KEEP_ALIVE=-1"
- Restart ollama and reload systemd:
systemctl daemon-reload systemctl restart ollama
- Soft start llama3 to keep in memory:
ollama run llama3 ""
- Check if the model was correctly loaded and is using the gpu:
ollama ps