You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/background/software.md
+52-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# 2.5 Software and computing environment
2
2
3
-
On this page you'll find information about the computing environment and datasets that will be used in both of the tutorials in this book.
3
+
On this page you'll find information about the computing environment that will be used in both of the tutorials in this book. We provide instructions for Running locally (on laptop), or on a hosted JupyterHub in AWS us-west-2.
4
4
5
5
## *Running tutorial materials locally*
6
6
@@ -17,6 +17,8 @@ There are two options for creating a software environment: [pixi](https://pixi.s
17
17
```pixi run itslive```
18
18
```pixi run sentinel1```
19
19
20
+
Note that the first `pixi run` will download specific versions of all required Python libraries to a hidden directory `./.pixi`. Subsequent runs activate that environment and execute code within it. You can also run `pixi shell` to "activate" the environment (set paths to executables and auxiliary files) and `exit` to deactivate it.
21
+
20
22
### To use conda/mamba
21
23
22
24
1. Clone this book's GitHub repository:
@@ -32,3 +34,52 @@ There are two options for creating a software environment: [pixi](https://pixi.s
32
34
```jupyterlab```
33
35
34
36
Both tutorials use functions that are stored in scripts associated with each dataset. You can find these scripts here: [`itslive_tools.py`](../itslive/nbs/itslive_tools.py) and [`s1_tools.py`](../s1/nbs/s1_tools.py).
37
+
38
+
39
+
## *Running tutorial materials on a hosted JupyterHub*
40
+
41
+
Many NASA datasets including ITS_LIVE are hosted in the AWS us-west-2 data center. While these tutorial notebooks are designed to be run on any computer, if you intend to modify the notebooks and access data directly it is desireable to run computations in the same data center. A convenient way access a computer in AWS us-west-2 is to use a hosted JupyterHub platform such as one of the following:
On these systems you can install software environment in the same way described above, but you must make the default JupyterLab interface aware of your environment. In Jupyter terminology you must specify a 'kernel'. Unfortunately there is not an automatic and uniform way of doing this, but a few manual steps can be followed:
48
+
49
+
1. Create a kernel specification subfolder under your home directory:
2. Use a text editor to add the following JSON to a `kernel.json` file in the directory we created above (`/home/jovyan/.local/share/jupyter/kernels/pixi/kernel.json`):
55
+
```
56
+
{
57
+
"argv": [
58
+
"/home/jovyan/.pixi/bin/pixi",
59
+
"run",
60
+
"python",
61
+
"-m",
62
+
"ipykernel_launcher",
63
+
"-f",
64
+
"{connection_file}"
65
+
],
66
+
"display_name": "Pixi (default)",
67
+
"language": "python",
68
+
"metadata": {
69
+
"debugger": true
70
+
}
71
+
}
72
+
```
73
+
74
+
Once created you should see this kernel listed in the output of `jupyter kernelspec list`:
Finally, you may need to reload your web browser in order to see 'Pixi (default)' as an optional kernel to select when you open one of the Jupyter Notebooks in this repository. With 'Pixi (default)' as the selected kernel code in the notebook will use the environment defined in your `.pixi` folder!
0 commit comments