From e3dfd4e0a0248614c45800e711ab82a82af98d09 Mon Sep 17 00:00:00 2001 From: patmjen <patmjen@dtu.dk> Date: Thu, 24 Nov 2022 10:07:25 +0100 Subject: [PATCH] Make venv config more visible in guide --- HPC_Python_Guide.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/HPC_Python_Guide.md b/HPC_Python_Guide.md index 1270fd1..6b5f102 100644 --- a/HPC_Python_Guide.md +++ b/HPC_Python_Guide.md @@ -40,7 +40,15 @@ a100sh source init.sh ``` This will setup and activate your virtualenv. You must **do this every time** you log in or change node (e.g. by calling `sxm2sh`)! - > **Tip:** You can configure the Python version, CUDA version, and name and location of the virtualenv by changing the variables at the top of `init.sh`. + > **Tip:** To configure the virtualenv change the following variables at the top of `init.sh`: + > ```bash + > # Configuration + > # This is what you should change for your setup + > PYTHON_VERSION=3.9.14 # Python version (default: 3.9.14) + > CUDA_VERSION=11.6 # CUDA version (default: 11.6) + > VENV_DIR=. # Where to store your virtualenv (default: current directory) + > VENV_NAME=venv # Name of your virtualenv (default: venv) + > ``` 5. Your are done! You can now install packages with `pip install <PACKAGE>` and run python3 code with `python`. > __Troubleshooting:__ If pip doesn't work, you may need to manually install it with: `easy_install pip` -- GitLab