forked from CIROH-UA/ciroh-ua_website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Conda Environment Docs and draw.io Plugin (CIROH-UA#212)
- Loading branch information
Showing
7 changed files
with
422 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
docs/services/cloudservices/ciroh jupyterhub/documentation/conda/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
sidebar_position: 5 | ||
title: "Persistent Conda Environment" | ||
description: "2i2c JupyterHub is a cloud-based JupyterHub environment specifically designed for hydrological researchers. It is powered by 2i2c JupyterHub, a cloud-based JupyterHub environment specifically on Google Cloud" | ||
tags: | ||
- 2i2c | ||
- JupyterHub | ||
- conda | ||
- persistent | ||
- tutorial | ||
--- | ||
|
||
# Persistent Conda Environments on CIROH 2i2c Server | ||
To ensure your Conda environments persist across server restarts on the CIROH 2i2c server, create them in your home directory. Follow these steps: | ||
|
||
### 1. Create a directory for Conda environments: | ||
You can set up a directory within your home folder to store all your Conda environments. This prevents them from being removed when the server is restarted. For example: | ||
|
||
```bash | ||
mkdir -p ~/conda_envs | ||
``` | ||
### 2. Create a new environment in that directory: | ||
Use the *--prefix* option with conda create to specify the location where you want to create your environment. For example, to create an environment called *my_env* in *~/conda_envs*: | ||
|
||
```bash | ||
conda create --prefix ~/conda_envs/my_env python=3.9 | ||
``` | ||
### 3. Activate the environment: | ||
You can activate the environment as usual, using the path to where you created it: | ||
|
||
```bash | ||
conda activate ~/conda_envs/my_env | ||
``` | ||
|
||
### 4. Autotomatically activate the environment on restart: | ||
If you want this environment to be activated every time you log in or the server restarts, you can add the following to your *.bashrc* or *.bash_profile* file: | ||
|
||
```bash | ||
conda activate ~/conda_envs/my_env | ||
``` | ||
|
||
By creating your environments in your home folder (e.g., *~/conda_envs/*), they will persist across server restarts, ensuring that you don't have to recreate them every time. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.