forked from GeoscienceAustralia/dea-coastlines
-
Notifications
You must be signed in to change notification settings - Fork 1
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.
- Log in to the EASI Asia Hub
- Open a terminal, and create a SSH Key with
ssh-keygen
. Just press enter to accept the defaults. - Get the public key by running
cat ~/.ssh/id_rsa.pub
and copy this (from thessh-rsa through to
jupyter-user`) - Add this as a Deploy Key (or ask Alex to). Make sure it has write permissions.
- Back on the EASI Hub command line, clone the repo:
git clone git@github.com:auspatious/dea-coastlines.git
- 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:
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.