Skip to content

Commit

Permalink
Update the cloud isis build script
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-alexandrov committed Dec 8, 2023
1 parent 0a1a9bd commit 18933bb
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 4 deletions.
50 changes: 49 additions & 1 deletion .github/workflows/build_isis.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,58 @@
#!/bin/bash

# Must wipe any cache before running this script, to ensure
# the conda env at the end of this gets cached

cd
echo Now in $(pwd)

conda init bash
source /Users/runner/.bash_profile

echo listing envs
conda env list

echo Wiping old env
/bin/rm -rf /usr/local/miniconda/envs/asp_deps

/bin/rm -f isis_environment.yml
wget https://raw.githubusercontent.com/NeoGeographyToolkit/StereoPipeline/master/.github/workflows/isis_environment.yml
echo Creating a new asp_deps env
conda env create -n asp_deps -f isis_environment.yml

conda activate asp_deps

conda install -c conda-forge parallel -y
conda install -c conda-forge rocksdb=8.5.3 rapidjson=1.1.0 -y

#conda install -c nasa-ames-stereo-pipeline -c usgs-astrogeology -c conda-forge libnabo=asp3.4.0_alpha libpointmatcher=asp3.4.0_alpha -y

# Make the python env
echo Creating a new python_isis8 env
/bin/rm -rf /usr/local/miniconda/envs/python_isis8
conda create -n python_isis8 python=3.12.0 numpy=1.26.2 -y

echo Will build ISIS3
conda activate asp_deps
git clone https://github.com/DOI-USGS/ISIS3.git
cd ISIS3

mkdir build
cd build
export ISISROOT=$PWD
export PREFIX=/usr/local/miniconda/envs/asp_deps
cmake -GNinja -DJP2KFLAG=OFF -Dpybindings=OFF \
-DbuildTests=OFF -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$PREFIX ../isis

export NINJAJOBS=2
ninja build -j 2
/usr/bin/time ninja install -j 2

# Archive the conda env in the packages dir. This dir
# is set in the .yml file. It will be saved as
# an artifact.
echo Will archive the conda env
packageDir=$HOME/work/StereoPipeline/packages
mkdir -p $packageDir
cd /usr/local/miniconda
/usr/bin/time tar czf $packageDir/asp_deps_osx.tar.gz envs
3 changes: 2 additions & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-
- name: build_test
run: ./.github/workflows/build_test.sh
##run: ./.github/workflows/build_test.sh
run: ./.github/workflows/build_isis.sh
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/isis_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies:
- nn
- opencv>=4.5.2, <5
- openssl>=3.1.2,<4.0a0
- pcl=1.13.1=h86d90ae_2
- pcl=1.13
- plio
- protobuf
- python=3.12
Expand Down
2 changes: 1 addition & 1 deletion src/asp/Tools/stereo_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def parse_corr_seed_mode(filename):
fh = open(filename, 'r', encoding='utf8', errors='ignore')

for line in fh:
line = re.sub('\#.*?$', '', line) # wipe comments
line = re.sub(r'\#.*?$', '', line) # wipe comments
matches = re.match(r'^\s*corr-seed-mode\s+(\d+)', line)
if matches:
mode = int(matches.group(1))
Expand Down

0 comments on commit 18933bb

Please sign in to comment.