Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Conda Environment Docs and draw.io Plugin #212

Merged
merged 4 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions docs/services/access.md → docs/services/access.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
sidebar_position: 2
title: "Infrastructure Access"
---
import Drawio from '@theme/Drawio'
import simpleGraph from '!!raw-loader!@site/static/files/ciroh-resource-flowchart.drawio';

# Infrastructure Access at CIROH

CIROH provides access to both public cloud and on-premises infrastructure to support the research projects of its members and partners.
<div className="hero-image" style={{ textAlign: 'center' }}>
<img src="/img/ciroh-resource-flowchart.png" alt="ciroh-resource flowchart" style={{ width: '100%' }} />
</div>
<Drawio content={simpleGraph} />





## Public Cloud

Expand Down
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.


17 changes: 6 additions & 11 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,10 @@ const config = {
}),
],
],
// markdown: {
// mermaid: true,
// },
// themes: [
// '@docusaurus/theme-mermaid', // <-- Add this line to enable Mermaid
// ],

plugins: [[ require.resolve('docusaurus-lunr-search'), {
languages: ['en'] // language codes
}]],
}],['drawio', {}]],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
Expand Down Expand Up @@ -198,10 +193,10 @@ plugins: [[ require.resolve('docusaurus-lunr-search'), {
<br><br><br>
Copyright © ${new Date().getFullYear()} CIROH - The University of Alabama`,
},
// prism: {
// theme: prismThemes.github,
// darkTheme: prismThemes.dracula,
// },
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
}),

};
Expand Down
45 changes: 45 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"clsx": "^2.0.0",
"docusaurus": "^1.14.7",
"docusaurus-lunr-search": "^3.4.0",
"docusaurus-plugin-drawio": "^0.4.0",
"lunr": "^2.3.9",
"prism-react-renderer": "^2.3.0",
"react": "^18.2.0",
Expand Down
5 changes: 1 addition & 4 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@
--ifm-color-primary-lightest: #4fddbf;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
} */
.container {
max-width: 68%;
}


.docs-wrapper .container {
max-width: 100%;
margin-left: 1.3rem;
Expand Down
Loading
Loading