Skip to content
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
5 changes: 4 additions & 1 deletion docs/classroom-surf-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ miniconda:
- opensimplex ==0.4.5
- numpy >=1,<2
- pydantic >=2,<3
- copernicusmarine >=2
- pyyaml
- copernicusmarine >= 2.2.2
- openpyxl
- yaspin
- textual

# extra
- xarray
Expand Down
70 changes: 36 additions & 34 deletions docs/user-guide/tutorials/surf_research_cloud_setup.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {
"vscode": {
"languageId": "plaintext"
}
},
"id": "98770716",
"metadata": {},
"source": [
"# SURF Resarch Cloud: Virtualship environment setup\n",
"# SURF Resarch Cloud: VirtualShip environment setup\n",
"\n",
"> Note: \n",
"> This guide is specific to students who are enrolled at UU in the Dynamical Oceanography course.\n",
"```\n",
"Note: This guide is specific to students who are enrolled at Utrecht University.\n",
"```\n",
"\n",
"In the class, we use virtualship in the cloud (in this case, SURF Research Cloud - called SURF RC from here-on). This has several advantages:\n",
"In the class, we will use VirtualShip in the cloud (in this case, SURF Research Cloud - called SURF RC from here-on). This has several advantages:\n",
"\n",
"- You aren't limited to the power of your laptop\n",
"- Input datasets are downloaded faster, as they're downloaded to the cloud instance (and not to your laptop)\n",
Expand All @@ -29,9 +27,12 @@
"\n",
"## 3. Jupyter workspace layout and additional config\n",
"\n",
"> Note: This only needs to be done once during setup.\n",
"```\n",
"Note: This only needs to be done once during setup.\n",
"```\n",
"\n",
"In the Jupyter workspace, you'll see the following in your file explorer:\n",
"\n",
"```\n",
".\n",
"├── KERNEL-README.ipynb\n",
Expand All @@ -45,24 +46,24 @@
"\n",
"---\n",
"\n",
"To be able to run virtualship from the terminal, we need to take some additional steps which are detailed in the `KERNEL-README.ipynb` contains important information for configuring your environment. Namely, for our uses, the \"Initialize conda\" section. Do the following.\n",
"\n",
"> #### Initialize conda\n",
"> \n",
"> To make the already installed conda-tool available for yourself, you have to initialize your terminal shell.\n",
"> \n",
"> Start a \"Terminal\" tab in the Jupyter Lab launcher and type:\n",
"> ```\n",
"> /etc/miniconda/bin/conda init\n",
"> ```\n",
"> Close the terminal tab and start a new one.\n",
"> You will see that the terminal prompt has changed to something like\n",
"> ```\n",
"> (base) metheuser@mywsp:\n",
"> ```\n",
"> This is conda telling you that you are currently in the \"base\" environment.\n",
"\n",
"From here, you already have another environment set up for you. Running `conda env list` in the terminal, you should see:\n",
"To be able to run VirtualShip from the Terminal, we need to take some additional steps which are detailed in the `KERNEL-README.ipynb`. This contains important information for configuring your environment. Namely, for our uses, the \"Initialize conda\" section. Do the following:\n",
"\n",
"#### Initialize conda\n",
"\n",
"To make the already installed conda-tool available for yourself, you have to initialize your Terminal shell.\n",
"\n",
"Start a \"Terminal\" tab in the Jupyter Lab launcher and type: `/etc/miniconda/bin/conda init`\n",
"\n",
"Close the Terminal tab and start a new one.\n",
"You will see that the Terminal prompt has changed to something like\n",
"\n",
"```\n",
"(base) metheuser@mywsp:\n",
"```\n",
"\n",
"This is conda telling you that you are currently in the \"base\" environment.\n",
"\n",
"From here, you already have another environment set up for you. Running `conda env list` in the Terminal, you should see:\n",
"\n",
"```bash\n",
"conda env list\n",
Expand All @@ -73,27 +74,28 @@
"virtualship /etc/miniconda/envs/virtualship`\n",
"```\n",
"\n",
"Here you can do `conda activate virtualship` to activate the environment called \"virtualship\". This environment is a shared environment among all workspace users that can be centrally updated. If you want you can create and manage your own environments by running the relevant conda commands.\n",
"Here you can do `conda activate virtualship` to activate the environment called \"virtualship\". This environment is a shared environment among all workspace users that can be centrally updated. If you want, you can create and manage your own environments by running the relevant conda commands.\n",
"\n",
"With the `virtualship` environment, you now have access to the `virtualship` command in your terminal, which can be confirmed by running `virtualship --help`. From here you can `cd` into `data/shared-storage/{your-name}` and run `virtualship` commands as you would on your local machine.\n",
"With the `virtualship` environment, you now have access to the `virtualship` command in your Terminal, which can be confirmed by running `virtualship --help`. From here you can `cd` into `data/shared-storage/{your-name}` and run `virtualship` commands as you would on your local machine.\n",
"\n",
"---\n",
"Finally, when you're working in Jupyter Notebooks, you are able to access the Conda environment with `virtualship` and related dependencies by switching the Kernel in the top right of the UI.\n",
"\n",
"Finally, when you're working in Jupyter Notebooks, you are able to access the Conda environment with `virtualship` and related dependencies by switching the Kernel in the top right of the UI.\n",
"\n",
"\n",
"## Course facilitator notes\n",
"\n",
"If `virtualship` is updated on GitHub, and you want to update the shared environment, you can do so by running the following commands in the terminal:\n",
"If `virtualship` is updated on GitHub, and you want to update the shared environment, you can do so by running the following commands in the Terminal:\n",
"\n",
"```bash\n",
"conda activate virtualship\n",
"sudo /etc/miniconda/envs/virtualship/bin/pip install --upgrade git+https://github.com/OceanParcels/virtualship@main\n",
"```"
"```\n"
]
},
{
"cell_type": "markdown",
"id": "3926833e",
"metadata": {},
"source": []
}
Expand All @@ -104,5 +106,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 5
}
Loading