Skip to content

Environment Setup for EASI Asia

Alex Leith edited this page Oct 25, 2023 · 6 revisions

Here's notes on how to get set up on EASI Asia for development.

  1. Log in to the EASI Asia Hub
  2. Open a terminal, and create a SSH Key with ssh-keygen. Just press enter to accept the defaults.
  3. Get the public key by running cat ~/.ssh/id_rsa.pub and copy this (from the ssh-rsa through to jupyter-user`)
  4. Add this as a Deploy Key (or ask Alex to). Make sure it has write permissions.
  5. Back on the EASI Hub command line, clone the repo: git clone git@github.com:auspatious/dea-coastlines.git
  6. Next we need to set up a custom Python environment (from EASI docs):

You can copy and paste this whole section

MYENV=coastlines 
python -m venv ~/venvs/$MYENV
realpath /env/lib/python3.10/site-packages > ~/venvs/$MYENV/lib/python3.10/site-packages/base_venv.pth
source ~/venvs/$MYENV/bin/activate
cd dea-coastlines
pip install .
python -m ipykernel install --user --name=$MYENV --display-name "Coastlines Environment"

Later, if you want to install packages in the CLI, run this source ~/venvs/coastlines/bin/activate (there are other activations for other shells like Fish...)

In Jupyter, you need to choose the new kernel you created and all the packages will be present:

image

Re-creating the environment

To destroy the existing environment and start fresh, simply delete the folder:

rm -rf venvs/coastlines

If that says "permission denied" then move the remaining rubbish somewhere else mv venvs/coastlines /tmp/coastlines_old

Once you have removed the environment, start the process from the top again.

Clone this wiki locally