arshy commited on
Commit
3befe85
1 Parent(s): 676ae67
Files changed (1) hide show
  1. start.sh +16 -13
start.sh CHANGED
@@ -1,35 +1,38 @@
1
  #!/bin/bash
2
 
3
- # Update and initialize submodules recursively
4
  git submodule init
5
  git submodule update --init --recursive
6
 
7
  export POETRY_CACHE_DIR="/app/.cache"
8
 
9
- git config --system --add safe.directory /app
10
- git config --system --add safe.directory /app/olas-predict-benchmark
11
- git config --system --add safe.directory /app/olas-predict-benchmark/benchmark/mech
 
12
 
13
- # Checkout specific branches for your submodules
14
- cd olas-predict-benchmark/benchmark
15
- git checkout fix/mech-packages
16
  cd ../..
17
 
18
- cd olas-predict-benchmark/benchmark/mech
19
- git checkout main
20
  cd ../../..
21
 
22
-
23
  # Configure poetry to create virtual environments within the project directory
24
  poetry config virtualenvs.in-project true
25
 
26
-
27
  cd /app
28
 
 
 
 
29
  # Install dependencies as specified in poetry.lock file
30
  poetry install
31
 
 
32
  source /app/.venv/bin/activate
33
 
34
- # run gradio using the command below
35
- python app.py
 
1
  #!/bin/bash
2
 
3
+ # Initialize and update submodules
4
  git submodule init
5
  git submodule update --init --recursive
6
 
7
  export POETRY_CACHE_DIR="/app/.cache"
8
 
9
+ # Use --global to avoid permission issues
10
+ git config --global --add safe.directory /app
11
+ git config --global --add safe.directory /app/olas-predict-benchmark
12
+ git config --global --add safe.directory /app/olas-predict-benchmark/benchmark/mech
13
 
14
+ # Ensure you're in the right directory before running git checkout
15
+ cd /app/olas-predict-benchmark/benchmark
16
+ git checkout fix/mech-packages || echo "Branch 'fix/mech-packages' not found."
17
  cd ../..
18
 
19
+ cd /app/olas-predict-benchmark/benchmark/mech
20
+ git checkout main || echo "Switching to 'main'."
21
  cd ../../..
22
 
 
23
  # Configure poetry to create virtual environments within the project directory
24
  poetry config virtualenvs.in-project true
25
 
 
26
  cd /app
27
 
28
+ # If pyproject.toml has changed significantly, update dependencies
29
+ poetry lock --no-update
30
+
31
  # Install dependencies as specified in poetry.lock file
32
  poetry install
33
 
34
+ # Activate the virtual environment
35
  source /app/.venv/bin/activate
36
 
37
+ # Run the application
38
+ python app.py