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: README.md
+19-1Lines changed: 19 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,6 @@ By packaging everything up with Docker we help ensure that code written during t
17
17
18
18
There are a handful of helpful `make` commands for building and testing images.
19
19
20
-
-`py-lock` - Generate a new Python lockfile.
21
20
-`py-build` - Build Python Docker container (should regenerate lockfile if `environment.yml` was changed).
22
21
-`py-lab` - Launch JupyterLab for Python image. Watch the terminal output for a `127.0.0.1:8080/...` link with the access token.
23
22
-`r-lock` - Generate a new R lockfile.
@@ -26,6 +25,25 @@ There are a handful of helpful `make` commands for building and testing images.
26
25
27
26
## Testing user-generated environments
28
27
28
+
Our environments are now using pixi to build and manage Conda environments, and pixi-kernel to allow for user installed environments.
29
+
30
+
The base (default) environment is built up of multiple features, each one corresponding to a specific tutorial. It's fine to overlap dependencies between tutorials, as that makes sure we don't remove them inadvertantly.
31
+
32
+
To add dependencies for a tutorial, `pixi add -f year-presenter deps...`, for example: `pixi add -f 24-Callum numpy cartopy pandas gsw matplotlib seaborn cmocean cmcrameri tqdm seaborn argopy ipyleaflet searvey shapely cftime ioos_qc cf_xarray`.
33
+
34
+
Then for a new tutorial, the feature needs to be added to the `features` list for the environment in `pixi.toml`.
35
+
36
+
```toml
37
+
[environments]
38
+
default = {features = ["24-Callum"]}
39
+
```
40
+
41
+
Then run `pixi install` and pixi will figure out all the transitive dependencies for multiple deployment environments (Mac and Linux, Windows can be added easily) and try to lock the most common environment for all of them.
42
+
43
+
If packages are being added to an existing feature that is already part of the default feature, then `pixi install` should not need to be run as the lock file will be updated during `pixi add`.
44
+
45
+
### Old
46
+
29
47
Both images use [`nb_conda_kernels`](https://github.com/Anaconda-Platform/nb_conda_kernels) which allows our users to create their own Conda environments.
30
48
31
49
This makes it so that we don't have to package everything into the images to start with.
0 commit comments