Skip to content

Commit

Permalink
Merge pull request hotosm#120 from hotosm/fix/workflow
Browse files Browse the repository at this point in the history
Fix Backend Build
  • Loading branch information
kshitijrajsharma authored Jun 19, 2023
2 parents 18a0af4 + b160db3 commit 444f325
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
26 changes: 11 additions & 15 deletions .github/workflows/backend_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,19 @@ jobs:
- name: Clone Ramp
run: git clone https://github.com/kshitijrajsharma/ramp-code-fAIr.git ramp-code

- name : Install gdown
run : pip install gdown
- name: Install gdown
run: pip install gdown

- name: Download Basemodel
run: gdown --fuzzy https://drive.google.com/file/d/1wvJhkiOrSlHmmvJ0avkAdu9sslFf5_I0/view?usp=sharing

- name: Unzip and Move Basemodel
run: unzip checkpoint.tf.zip -d ramp-code/ramp

- name: Add ubuntugis ppa & Update
run: sudo add-apt-repository ppa:ubuntugis/ppa && sudo apt-get update

- name: Install numpy
run: pip install numpy==1.23.5

- name: Install gdal
run: |
sudo apt-get install gdal-bin
sudo apt-get install libgdal-dev
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version`
sudo apt-get -y install gdal-bin libgdal-dev python3-gdal && sudo apt-get -y autoremove && sudo apt-get clean
pip install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="-I/usr/include/gdal"
- name: Install ramp dependecies
run: |
Expand All @@ -87,6 +78,7 @@ jobs:
run: |
cd backend/
pip install -r requirements.txt
- name: Creating env
run: |
cd backend/
Expand All @@ -104,6 +96,12 @@ jobs:
cd backend/
celery -A aiproject --broker=redis://localhost:6379/ flower &
- name: Fix gdal array
run: |
pip uninstall -y gdal
pip install numpy
pip install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="-I/usr/include/gdal"
- name: Run tests
env:
TESTING_TOKEN: ${{ secrets.TESTING_TOKEN }}
Expand All @@ -117,5 +115,3 @@ jobs:
python manage.py migrate
python manage.py migrate login
python manage.py migrate core
2 changes: 1 addition & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ django_celery_results==2.4.0
flower==1.2.0
validators==0.20.0
gpxpy==1.5.0
hot-fair-utilities==1.0.49
hot-fair-utilities==1.0.51
geojson2osm==0.0.1

0 comments on commit 444f325

Please sign in to comment.