Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Backend Build #120

Merged
merged 2 commits into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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