"Please note that we have another environment like this, called restore:\n",
"`/home/spack/envs/restore`"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "45e09ec6-6670-4dc0-bef1-3dcc1e6504ec",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"# packages in environment at /home/spack/envs/restore:\n",
"#\n",
"# Name Version Build Channel\n",
"_libgcc_mutex 0.1 main \n",
"_openmp_mutex 4.5 1_gnu \n",
"ca-certificates 2021.9.30 h06a4308_1 \n",
"certifi 2021.10.8 py39h06a4308_0 \n",
"ld_impl_linux-64 2.35.1 h7274673_9 \n",
"libffi 3.3 he6710b0_2 \n",
"libgcc-ng 9.3.0 h5101ec6_17 \n",
"libgomp 9.3.0 h5101ec6_17 \n",
"libstdcxx-ng 9.3.0 hd4cf53a_17 \n",
"ncurses 6.2 he6710b0_1 \n",
"openssl 1.1.1l h7f8727e_0 \n",
"pip 21.2.4 py39h06a4308_0 \n",
"python 3.9.7 h12debd9_1 \n",
"readline 8.1 h27cfd23_0 \n",
"setuptools 58.0.4 py39h06a4308_0 \n",
"sqlite 3.36.0 hc218d9a_0 \n",
"tk 8.6.11 h1ccaba5_0 \n",
"tzdata 2021a h5d7bf9c_0 \n",
"wheel 0.37.0 pyhd3eb1b0_1 \n",
"xz 5.2.5 h7b6447c_0 \n",
"zlib 1.2.11 h7b6447c_3 \n"
]
}
],
"source": [
"!conda list -p /home/spack/envs/restore"
]
},
{
"cell_type": "markdown",
"id": "3c241577-5e41-40d8-9b3e-fd8874118d20",
"metadata": {},
"source": [
"When you want to use pip to restore the environment:\n",
"```bash\n",
"# create a virtual environment\n",
"python3 -m venv env\n",
"# use that to install the packages\n",
"./env/bin/pip install -r requirements.txt\n",
"```\n",
"\n",
"Here it will use the python3 that you give, meaning that it will not be Python 3.9 as we specified above.\n",
"Download the correct python interpreter first. [here](https://www.python.org/downloads/) or any other way."
]
},
{
"cell_type": "markdown",
"id": "7b665eb3-d531-4288-9e58-b2e29ec48e74",
"metadata": {},
"source": [
"# Design\n",
"It is possible to write your own environment file and use it for build a special environment."
]
},
{
"cell_type": "markdown",
"id": "b23ecff1-a329-42df-b2e6-57cc8d6d480a",
"metadata": {},
"source": [
"There are three things you need:\n",
"- name\n",
"- channels (mostly conda-forge and defaults)\n",
"- dependencies (packages)\n",
"\n",
"An example yaml file\n",
"\n",
"```yaml\n",
"name: selfdesigned\n",
"channels:\n",
"- conda-forge\n",
"- defaults\n",
"dependencies:\n",
"- numpy\n",
"- pandas\n",
"- xarray\n",
"- pip:\n",
" - metpy\n",
"```\n",
"\n",
"you can specify versions using `numpy=1.0` or `python=3.6`. If no version is given the newest compatible version will be used."
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "fe80dc6b-aa2a-40d2-b73e-67acf5b487c2",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Writing design.yaml\n"
]
}
],
"source": [
"%%writefile design.yaml\n",
"name: selfdesigned\n",
"channels:\n",
"- conda-forge\n",
"- defaults\n",
"dependencies:\n",
"- numpy\n",
"- pandas\n",
"- xarray\n",
"- pip:\n",
" - metpy"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "3d821016-50d6-4696-ac47-06755d57e990",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.\n",
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
SRVX1 serves a teaching [jupyterhub](https://jupyterhub.readthedocs.io/en/stable/) with a [jupyterlab](https://jupyterlab.readthedocs.io/en/stable/). It allows easy access for students and teachers.
SRVX1 serves a teaching [jupyterhub](https://jupyterhub.readthedocs.io/en/stable/) with a [jupyterlab](https://jupyterlab.readthedocs.io/en/stable/). It allows easy access for students and teachers.
Signup is only granted by teachers and requires a srvx1 user account. A new password is needed and a TOTP (time base one-time password) will be created.
Signup is only granted by teachers and requires a srvx1 user account. A new password is needed and a TOTP (time base one-time password) will be created.
Download/Use any of these required Authenticator Apps:
Download/Use any of these required Authenticator Apps: