Skip to content
Snippets Groups Projects
Commit a66dc532 authored by Narayanarao Bhogapurapu's avatar Narayanarao Bhogapurapu
Browse files

Update build.sh

parent 631609e8
No related branches found
No related tags found
No related merge requests found
...@@ -2,58 +2,48 @@ ...@@ -2,58 +2,48 @@
set -xeuo pipefail set -xeuo pipefail
# Get the base directory of the script
basedir=$(dirname "$(readlink -f "$0")") basedir=$(dirname "$(readlink -f "$0")")
# Make sure conda is updated to a version that supports the --no-capture-output option # Ensure conda is updated to a version that supports the --no-capture-output option
# conda install -y -n base -c conda-forge "conda>=4.13.0" # conda install -y -n base -c conda-forge "conda>=4.13.0"
conda install -y -n base -c conda-forge gdal
pip install pandas scikit-image empatches scikit-learn scipy numpy matplotlib tqdm futures
# pip install Pyarrow # Install essential packages in the base environment
# pip install --upgrade numpy conda install -y -n base -c conda-forge gdal
# Install Python packages using pip
pip install pandas scikit-image empatches scikit-learn scipy numpy matplotlib tqdm futures
# Create conda env containing only conda-lock # Create a new conda environment for your project (uncomment if needed)
# conda create -y -n ich gdal matplotlib scipy scikit-image tqdm pandas # conda create -y -n ich gdal matplotlib scipy scikit-image tqdm pandas
# Install dependencies from lock file for speed and reproducibility # Install dependencies from lock file for speed and reproducibility (uncomment if needed)
# conda-lock install -n ich "${basedir}/environment/conda-lock.yml" # conda-lock install -n ich "${basedir}/environment/conda-lock.yml"
# Install maap-py, since it cannot be specified in the lock file # Install additional packages that can't be specified in the lock file (uncomment if needed)
# conda env update -n ich --file "${basedir}/environments/environment-maappy.yml" # conda env update -n ich --file "${basedir}/environments/environment-maappy.yml"
# Install the current project in editable mode (uncomment if needed)
# conda run --no-capture-output -n ich PIP_REQUIRE_VENV=0 python -m pip install -e "${basedir}" # conda run --no-capture-output -n ich PIP_REQUIRE_VENV=0 python -m pip install -e "${basedir}"
# Fail build if finicky mix of fiona and gdal isn't correct, so that we don't # Verify the GDAL installation and other package availability
# have to wait to execute a DPS job to find out. conda run --no-capture-output -n ich python -c '
# conda run --no-capture-output -n ich python -c ' try:
# from osgeo import gdal from osgeo import gdal
# import warnings import warnings
# import argparse,os,sys,warnings import argparse
import os
# import numpy as np, pandas as pd import sys
# from osgeo import gdal from skimage.util.shape import view_as_blocks
# from scipy import interpolate from mpl_toolkits.axes_grid1 import make_axes_locatable
# import matplotlib.pyplot as plt from scipy.interpolate import griddata
# from matplotlib import cm from tqdm import tqdm
# from matplotlib.colors import Normalize from concurrent.futures import ProcessPoolExecutor, as_completed
print("All modules imported successfully.")
# from scipy.stats import linregress except ImportError as e:
# from skimage.util.shape import view_as_blocks print(f"Import error: {e}")
# from mpl_toolkits.axes_grid1 import make_axes_locatable sys.exit(1)
# from scipy.interpolate import griddata '
# from tqdm import tqdm
# from scipy.interpolate import interpn # Optionally, you can include additional checks or commands below
# gdal.UseExceptions() # For example, checking for specific versions of packages or running a test script.
# warnings.filterwarnings("ignore")
# warnings.filterwarnings("error")
# np.seterr(divide="ignore", invalid="ignore")
# # Make sure pip install worked
# from maap.maap import MAAP
# warnings.filterwarnings("ignore", message=".*initial implementation of Parquet.*")
# '
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment