Spaces:
Runtime error
Runtime error
# 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 |