Skip to content

Commit

Permalink
Update python-crop-image.yml
Browse files Browse the repository at this point in the history
Change to conda environment setup
  • Loading branch information
karen-an authored Jan 15, 2025
1 parent c74682c commit fe21027
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions .github/workflows/python-crop-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,31 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
# - name: Set up Python
# uses: actions/setup-python@v3
# with:
# python-version: "3.9.21"
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: "3.9.21"
python-version: 3.11
environment-file: environment.yml
auto-update-conda: true
activate-environment: classification
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -r requirements.txt
- name: Install GDAL dependencies
run: |
sudo apt-get update
sudo apt-get install -y gdal-bin libgdal-dev
# - name: Install GDAL dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y gdal-bin libgdal-dev

- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install pygdal==$(gdal-config --version).* --global-option=build_ext --global-option="-I$(gdal-config --cflags | sed -e 's/-I//g')" --global-option="-L$(gdal-config --libs | sed -e 's/-L//g')"
pip install -r requirements.txt
# - name: Install Python dependencies
# run: |
# pip install --upgrade pip
# pip install pygdal==$(gdal-config --version).* --global-option=build_ext --global-option="-I$(gdal-config --cflags | sed -e 's/-I//g')" --global-option="-L$(gdal-config --libs | sed -e 's/-L//g')"
# pip install -r requirements.txt
- name: Run Jupyter notebook
run: jupyter execute crop_image.pynb
shell: bash
Expand Down

0 comments on commit fe21027

Please sign in to comment.