Skip to content

Latest commit

 

History

History
111 lines (74 loc) · 1.79 KB

EC2_Setup_and_Run.md

File metadata and controls

111 lines (74 loc) · 1.79 KB

Create Downloads directory

mkdir ~/Downloads

Change to Downloads directory

cd ~/Downloads/

wget miniconda3 from source

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

Install MiniConda3

bash Miniconda3-latest-Linux-x86_64.sh

Activate newly created Conda system

source ~/.bashrc

Return to home directory

cd

Add Conda-Forge channel

conda config --add channels conda-forge

Set priority for Conda-Forge channel

conda config --set channel_priority strict

Clone KMeans NDVI Repo

git clone https://github.com/exowanderer/MachineLearningBioMassIndicators

Change directory to github repo

cd MachineLearningBioMassIndicators/

Create mlbmi conda environment

conda env create --file mlbmi_environment.yml

Active mlbmi conda environment

conda activate mlbmi

Configure AWS with AWS_ACCESS_KEY_ID and AWS_SECRET_KEY

Only necessary is the user wants to request the JP2 files

aws configure

Create environment variable for STAC_API_URL

This can be added the ~/.bashrc as well

export STAC_API_URL='https://earth-search.aws.element84.com/v0'

Activate run script for base parameters without plotting

python doeberitzer_mlbmi.py --band_names b04 b08 --start_date 2020-01-01 --end_date 2020-02-01 --cloud_cover 1 --download --verbose

Run PyTest operations

python -m pytest

Open Jupyter Lab to run Jupyter notebook on local machine

jupyter lab

If using on EC2, follow the instructions here to access the notebook

jupyter lab --no-browser