Skip to content
Snippets Groups Projects
Commit af972700 authored by Martin Schroschk's avatar Martin Schroschk
Browse files

Fix paths to workspace

parent 313ef99d
No related branches found
No related tags found
2 merge requests!938Automated merge from preview to main,!936Update to Five-Cluster-Operation
......@@ -50,11 +50,11 @@ Then create the virtual environment and activate it.
```console
marie@compute$ ws_allocate python_virtual_environment 1
Info: creating workspace.
/horse/ws/marie-python_virtual_environment
/data/horse/ws/marie-python_virtual_environment
[...]
marie@compute$ virtualenv --system-site-packages /horse/ws/marie-python_virtual_environment/env #Create virtual environment
marie@compute$ virtualenv --system-site-packages /data/horse/ws/marie-python_virtual_environment/env #Create virtual environment
[...]
marie@compute$ source /horse/ws/marie-python_virtual_environment/env/bin/activate #Activate virtual environment. Example output: (env) bash-4.2$
marie@compute$ source /data/horse/ws/marie-python_virtual_environment/env/bin/activate #Activate virtual environment. Example output: (env) bash-4.2$
```
Now you can work in this isolated environment, without interfering with other
......@@ -73,7 +73,7 @@ the environment as follows:
```console
marie@login.alpha$ srun --nodes=1 --gres=gpu:1 --time=01:00:00 --pty bash
marie@alpha$ ws_allocate my_python_virtualenv 100 # use a workspace for the environment
marie@alpha$ cd /horse/ws/marie-my_python_virtualenv
marie@alpha$ cd /data/horse/ws/marie-my_python_virtualenv
marie@alpha$ module load modenv/hiera GCC/10.2.0 CUDA/11.1.1 OpenMPI/4.0.5 PyTorch/1.9.0
Module GCC/10.2.0, CUDA/11.1.1, OpenMPI/4.0.5, PyTorch/1.9.0 and 54 dependencies loaded.
marie@alpha$ which python
......@@ -113,9 +113,9 @@ packages from the file:
```console
marie@compute$ module load Python #Load default Python
[...]
marie@compute$ virtualenv --system-site-packages /horse/ws/marie-python_virtual_environment/env_post #Create virtual environment
marie@compute$ virtualenv --system-site-packages /data/horse/ws/marie-python_virtual_environment/env_post #Create virtual environment
[...]
marie@compute$ source /horse/ws/marie-python_virtual_environment/env/bin/activate #Activate virtual environment. Example output: (env_post) bash-4.2$
marie@compute$ source /data/horse/ws/marie-python_virtual_environment/env/bin/activate #Activate virtual environment. Example output: (env_post) bash-4.2$
(env_post) marie@compute$ pip install -r requirements.txt #Install packages from the created requirements.txt file
```
......@@ -147,7 +147,7 @@ directory for the conda virtual environment:
```console
marie@compute$ ws_allocate conda_virtual_environment 1
Info: creating workspace.
/horse/ws/marie-conda_virtual_environment
/data/horse/ws/marie-conda_virtual_environment
[...]
```
......@@ -156,8 +156,8 @@ environment:
```console
marie@compute$ module load Anaconda3 #load Anaconda module
marie@compute$ conda create --prefix /horse/ws/marie-conda_virtual_environment/conda-env python=3.6 #create virtual environment with Python version 3.6
marie@compute$ conda activate /horse/ws/marie-conda_virtual_environment/conda-env #activate conda-env virtual environment
marie@compute$ conda create --prefix /data/horse/ws/marie-conda_virtual_environment/conda-env python=3.6 #create virtual environment with Python version 3.6
marie@compute$ conda activate /data/horse/ws/marie-conda_virtual_environment/conda-env #activate conda-env virtual environment
```
Now you can work in this isolated environment, without interfering with other
......@@ -185,7 +185,7 @@ can deactivate the conda environment as follows:
```console
marie@login.alpha$ srun --nodes=1 --gres=gpu:1 --time=01:00:00 --pty bash
marie@alpha$ ws_allocate my_conda_virtualenv 100 # use a workspace for the environment
marie@alpha$ cd /horse/ws/marie-my_conda_virtualenv
marie@alpha$ cd /data/horse/ws/marie-my_conda_virtualenv
marie@alpha$ module load Anaconda3
Module Anaconda3/2021.11 loaded.
marie@alpha$ conda create --prefix my-torch-env python=3.8
......@@ -250,8 +250,8 @@ Recreate the conda virtual environment with the packages from the created
`environment.yml` file:
```console
marie@compute$ mkdir /horse/ws/marie-conda_virtual_environment/conda-env #Create directory for environment
marie@compute$ mkdir /data/horse/ws/marie-conda_virtual_environment/conda-env #Create directory for environment
marie@compute$ module load Anaconda3 #Load Anaconda
marie@compute$ conda config --set channel_priority strict
marie@compute$ conda env create --prefix /horse/ws/marie-conda_virtual_environment/conda-env --file environment.yml #Create conda env in directory with packages from environment.yml file
marie@compute$ conda env create --prefix /data/horse/ws/marie-conda_virtual_environment/conda-env --file environment.yml #Create conda env in directory with packages from environment.yml file
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment