Files
conjurer/conjurer_librarian/install_librarian_service.sh
T
gitea c1054241eb Fixing librarian result (#6)
* Formatting and additional logging for bugfix

* Formatting and additional logging for bugfix

* Change of log location

* fixing_librarian_result

* Hopefully final fix that will be needed

* Temporary

* Glebokie gardlo

* Fix in scrape_bot

* Fix that was needed.

* Scraper settings

* Small fix in scraping

* FIxing bad  naming convention

* Log message fix

* Test of deep search

* Fix in deep search

* Refactoring

* WHat and idiot coded that....
Ooops. That was me. A month ago.

* Refactoring continued

* Bugfix

* FIx

* Not needed after fix
2024-04-21 15:54:34 +02:00

34 lines
1.1 KiB
Bash

#!/bin/bash
# This script sets up a virtual environment for the Conjurer Librarian service and installs the required dependencies.
# Create a virtual environment at /home/pi/Conjurer_librarian/env
python3 -m venv /home/pi/Conjurer_librarian/env
# Copy the Conjurer Librarian Python script to the appropriate directory
cp /home/pi/conjurer/conjurer_librarian/conjurer_librarian.py ./Conjurer_librarian/
# Copy the requirements file to the appropriate directory
cp /home/pi/conjurer/conjurer_librarian/requirements_librarian.txt ./Conjurer_librarian/
# Change directory to /home/pi/Conjurer_librarian
cd /home/pi/Conjurer_librarian
touch /home/pi/Conjurer/rr_results.json
touch /home/pi/Conjurer/cr_results.json
touch /home/pi/Conjurer/s_results.json
touch /home/pi/Conjurer/rr_results.json
touch /home/pi/Conjurer/not_in_db.json
# Activate the virtual environment
source /home/pi/Conjurer_librarian/env/bin/activate
# Upgrade pip
./env/bin/python3 -m pip install --upgrade pip
# Install the required dependencies
./env/bin/python3 -m pip install -r requirements_librarian.txt
# Deactivate the virtual environment
deactivate