File size: 1,166 Bytes
52938ea
 
3befe85
a1dbd93
52938ea
 
3ee375a
8e635d7
3befe85
 
 
 
7108a33
3befe85
cc46863
4c0d012
ababcd1
20aceae
87d8300
80a1986
e05b515
52938ea
3befe85
20aceae
3befe85
db9dbb1
52938ea
 
 
66b5ba7
676ae67
db9dbb1
3befe85
 
 
52938ea
 
 
3befe85
d50283e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash

# Initialize and update submodules
git submodule init
git submodule update --init --recursive

export POETRY_CACHE_DIR="/app/.cache"

# Use --global to avoid permission issues
git config --global --add safe.directory /app
git config --global --add safe.directory /app/olas-predict-benchmark
git config --global --add safe.directory /app/olas-predict-benchmark/benchmark/mech

# Ensure you're in the right directory before running git checkout
cd /app/olas-predict-benchmark
git checkout main
git fetch origin fix/mech-packages:fix/mech-packages
git fetch --all
git branch -a
git checkout fix/mech-packages || git checkout -b fix/mech-packages origin/fix/mech-packages
cd ..

cd /app/olas-predict-benchmark/benchmark/mech
git fetch --all
git checkout main || echo "Switching to 'main'."
cd ../../..

# Configure poetry to create virtual environments within the project directory
poetry config virtualenvs.in-project true

cd /app

# If pyproject.toml has changed significantly, update dependencies
poetry lock --no-update

# Install dependencies as specified in poetry.lock file
poetry install

# Activate the virtual environment
poetry run python app.py