2020-12-04 20:57:13 +01:00
## Python Virtual Environment
2020-11-06 23:51:56 +01:00
2020-12-04 20:57:13 +01:00
### Add new packages
Try to install any new package using `conda install -c CHANNEL PACKAGE_NAME` (you can use `pip` if the package is only available there). Make sure your Python virtual environment is active (`conda activate YOUR_ENV`).
2020-11-06 23:51:56 +01:00
2020-12-04 20:57:13 +01:00
### Remove packages
Uninstall packages using the same manager you used to install them `conda remove PACKAGE_NAME` or `pip uninstall PACKAGE_NAME`
2020-11-06 23:51:56 +01:00
2020-12-18 20:06:28 +01:00
### Updating all packages
Make sure your Python virtual environment is active (`conda activate YOUR_ENV`), then run
```bash
conda update --all
```
2020-11-06 23:51:56 +01:00
2020-12-18 20:06:28 +01:00
### Update your conda `environment.yaml`
After installing or removing a package you can use the following command in your terminal to update your `environment.yaml` before publishing your pipeline. Note that we ignore the package version for `libfortran` and `mkl` to keep compatibility with Linux:
2020-11-06 23:51:56 +01:00
```bash
2020-12-18 20:06:28 +01:00
conda env export --no-builds | sed 's/^.*libgfortran.*$/ - libgfortran/' | sed 's/^.*mkl=.*$/ - mkl/' > environment.yml
2020-11-06 23:51:56 +01:00
```
2020-12-04 20:57:13 +01:00
## R Virtual Environment
2020-11-06 23:51:56 +01:00
2020-12-04 20:57:13 +01:00
### Add new packages
1. Open your terminal and navigate to RAPIDS' root folder
2. Run `R` to open an R interactive session
3. Run `renv::install("PACKAGE_NAME")`
### Remove packages
1. Open your terminal and navigate to RAPIDS' root folder
2. Run `R` to open an R interactive session
3. Run `renv::remove("PACKAGE_NAME")`
2020-12-18 20:06:28 +01:00
### Updating all packages
1. Open your terminal and navigate to RAPIDS' root folder
2. Run `R` to open an R interactive session
3. Run `renv::update()`
2020-12-04 20:57:13 +01:00
### Update your R `renv.lock`
After installing or removing a package you can use the following command in your terminal to update your `renv.lock` before publishing your pipeline.
1. Open your terminal and navigate to RAPIDS' root folder
2. Run `R` to open an R interactive session
3. Run `renv::snapshot()` (renv will ask you to confirm any updates to this file)
2020-11-06 23:51:56 +01:00