This commit is contained in:
despiegk 2024-11-08 19:49:56 +03:00
parent 19988900c6
commit 776f89af69
3 changed files with 13 additions and 24 deletions

View File

@ -2,19 +2,15 @@
new version of threefold, minimalistic
## to debug / develop
## install
```bash
hero git clone -u git@git.ourworld.tf:tfgrid/www_threefold4.git
cd ~/code/git.ourworld.tf/tfgrid/www_threefold4
source myenv.sh
# to test an example
cd poc
python server.py
~/code/git.ourworld.tf/tfgrid/www_threefold4/install.sh
```
## to add package to pip
## to start the server for seeing the website
add it to https://git.ourworld.tf/projectmycelium/hero_server/src/branch/main/requirements.txt
```bash
~/code/git.ourworld.tf/tfgrid/www_threefold4/start.sh
```

View File

@ -4,21 +4,12 @@ BASE_DIR="$(cd "$(dirname "$0")" && pwd)"
source ${BASE_DIR}/myenv.sh
cd $BASE_DIR
python3 -m pip install -r "$BASE_DIR/requirements.txt"
# pip freeze > requirements.txt
#to make sure we have the paths towards hero in our library
python3 -m pip install -r "$BASE_DIR/requirements.txt"
pip install --upgrade pip
PYTHON_VERSION=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
echo "$BASE_DIR/lib" > "${VENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/herolib.pth"
#for osx
# pip3 install psycopg2-binary
# psycopg2
# echo "$BASE_DIR/lib" > "${VENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/herolib.pth"
echo "OK"
python3 -m pip install -r "requirements.txt"
pip install --upgrade pip

View File

@ -1,9 +1,11 @@
#!/bin/bash
set -ex
set -e
BASE_DIR="$(cd "$(dirname "$0")" && pwd)"
cd $BASE_DIR
source myenv.sh
cd poc
set +ex
open http://127.0.0.1:8001
python server.py