With packages (recommended)#
Available Linux distributions are:
Debian12 (Bookworm): referred as
bookworm
Ubuntu 22.04 (Jammy Jellyfish): referred as
jammyUbuntu 20.04 LTS (Focal Fossa): referred as
focal
Note
Using the pre-compiled binary package installation, gym-DSSAT comes with its proper Python virtual environment located in /opt/gym_dssat_pdi/bin/activate.
Package installation#
Debian 12 (Bookworm)#
echo "deb [ arch=amd64 ] https://repo.pdi.dev/debian bookworm main" | sudo tee /etc/apt/sources.list.d/pdi.list > /dev/null
sudo wget -O /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg https://repo.pdi.dev/debian/pdidev-archive-keyring.gpg
sudo chmod a+r /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg /etc/apt/sources.list.d/pdi.list
sudo apt update
sudo apt install pdidev-archive-keyring
sudo mkdir -p /usr/local/share/keyrings
sudo wget -O- https://xlab.udc.gal/gym-dssat/gym-dssat-archive-keyring.gpg | sudo tee /usr/local/share/keyrings/gym-dssat-archive-keyring.gpg > /dev/null
sudo echo "deb [signed-by=/usr/local/share/keyrings/gym-dssat-archive-keyring.gpg] https://xlab.udc.gal/gym-dssat bookworm main dev" | sudo tee /etc/apt/sources.list.d/gym-dssat.list > /dev/null
sudo chmod a+r /usr/local/share/keyrings/gym-dssat-archive-keyring.gpg
sudo apt update
sudo apt install gym-dssat-pdi
Ubuntu 20.04 (Focal Fossa)#
echo "deb [ arch=amd64 ] https://repo.pdi.dev/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/pdi.list > /dev/null
sudo wget -O /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg https://repo.pdi.dev/ubuntu/pdidev-archive-keyring.gpg
sudo chmod a+r /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg /etc/apt/sources.list.d/pdi.list
sudo apt update
sudo apt install pdidev-archive-keyring
sudo mkdir -p /usr/local/share/keyrings
sudo wget -O- https://xlab.udc.gal/gym-dssat/gym-dssat-archive-keyring.gpg | sudo tee /usr/local/share/keyrings/gym-dssat-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/local/share/keyrings/gym-dssat-archive-keyring.gpg] https://xlab.udc.gal/gym-dssat focal main" | sudo tee /etc/apt/sources.list.d/gym-dssat.list > /dev/null
sudo chmod a+r /usr/local/share/keyrings/gym-dssat-archive-keyring.gpg
sudo apt update
sudo apt install gym-dssat-pdi
Ubuntu 22.04 (Jammy Jellyfish)#
echo "deb [ arch=amd64 ] https://repo.pdi.dev/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/pdi.list > /dev/null
sudo wget -O /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg https://repo.pdi.dev/ubuntu/pdidev-archive-keyring.gpg
sudo chmod a+r /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg /etc/apt/sources.list.d/pdi.list
sudo apt update
sudo apt install pdidev-archive-keyring
sudo mkdir -p /usr/local/share/keyrings
sudo wget -O- https://xlab.udc.gal/gym-dssat/gym-dssat-archive-keyring.gpg | sudo tee /usr/local/share/keyrings/gym-dssat-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/local/share/keyrings/gym-dssat-archive-keyring.gpg] https://xlab.udc.gal/gym-dssat jammy main" | sudo tee /etc/apt/sources.list.d/gym-dssat.list > /dev/null
sudo chmod a+r /usr/local/share/keyrings/gym-dssat-archive-keyring.gpg
sudo apt update
sudo apt install gym-dssat-pdi
Test your installation#
First, activate gym-dssat’s Python virtual environment.
source /opt/gym_dssat_pdi/bin/activate
then
python /opt/gym_dssat_pdi/samples/run_env.py
After using gym-dssat, you can deactivate its Python virtual environment with:
deactivate
Uninstalling packages#
To remove gym-DSSAT packages from your system you just need to run:
sudo apt remove –purge gym-dssat-pdi dssat-pdi dssat-csm-data
After uninstalling gym-dssat, you probably want to get rid of other packages that were automatically installed to satisfy gym-dssat dependencies and maybe you do not need now. You can do it with:
sudo apt autoremove