{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Laptop configuration for the training\n", "\n", "The training will be conducted using X2Go-servers available in the TCE. Instructions on how to install X2Go on your laptop can be found in DM Tool document `EUM/RSP/VWG/18/1018393`.\n", "\n", "1. You should have X2Go already installed on your laptop, so go ahead and start it up using your TCE credentials\n", "2. Open a new console from the Start menu -> System Tools -> Konsole (font size can be made bigger with Ctrl +)\n", "\n", "\n", "## Installation and use of `conda`\n", "\n", "### Installation of `miniconda3`\n", "\n", "Type the following commands to the terminal.\n", "\n", "1. `wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh`\n", "2. `bash ~/miniconda.sh -b -p $HOME/miniconda3`\n", "3. `echo 'export PATH=\"$PATH:$HOME/miniconda3/bin\"' >> ~/.profile.local`\n", "4. `source ~/.profile.local`\n", "\n", "### Create a new `conda` environment for the training\n", "\n", "The name of the environment can be chosen freely, for the sake of simplicity we will use name `troll` for this training.\n", "\n", "1. `conda create -n troll python=3.6`\n", "\n", "Activate the `troll` environment with a command\n", "\n", "2. `source activate troll`\n", "\n", "You should have an indication in your terminal prompt that the conda environment is active, e.g.:\n", "`(troll) joro@x2g13:~ $`. When the `conda` environment is active, all the installations after this point will go only to this specific environment. The environment can be deactivated with `source deactivate`-command.\n", "\n", "### Installation of required libraries and modules\n", "\n", "Install the required libraries and modules with this monster one-liner:\n", "\n", "1. `conda install -c conda-forge gdal satpy jupyter ffmpeg \"imageio<2.5\" imageio-ffmpeg shapely cartopy scipy rasterio mysql-connector-python matplotlib cartopy scipy pycoast pyorbital`\n", "\n", "### Apply updates to packages\n", "\n", "PyTroll packages are constantly being developed. In order to carry out some the exercises, we need to get an updated version of one of the readers.\n", "\n", "1. `pip install git+https://github.com/pytroll/satpy.git`\n", "2. `cp /tcenas/scratch/pytroll/seviri_l1b_native.py ~/miniconda3/envs/troll/lib/python3.6/site-packages/satpy/readers/`\n", "\n", "\n", "## Using `jupyter`-notebook\n", "\n", "### Copy the exercises\n", "\n", "1. `mkdir ~/pytroll_training`\n", "2. `cp /tcenas/scratch/pytroll/exercises/* ~/pytroll_training`\n", "3. `cd ~/pytroll_training`\n", "\n", "### Starting headless `jupyter notebook` server\n", "In order to get the best performance for the exercises, we'll start `jupyter notebook` with a headless server, i.e., we run the notebook on the X2Go-server, but connect to it from your own laptops.\n", "\n", "Find out the IP-address of your server, and start `jupyter notebook` with `--ip` and `--no-browser` options\n", "1. `/sbin/ifconfig`\n", "2. `jupyter notebook --ip= --no-browser`\n", "\n", "Copy and paste the given URL to your laptops Google Chrome browser\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import satpy\n", "print (satpy.__file__)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.7" } }, "nbformat": 4, "nbformat_minor": 2 }