diff --git a/README.md b/README.md index ac13bbd2649a8d8c26e9bcde1a753ed8f9f252fd..dabd98ad0ee751438ea7d357fdcb770a5c8d9813 100644 --- a/README.md +++ b/README.md @@ -40,11 +40,12 @@ This step is necessary for importing container images from [Nvidia NGC](https:// - Complete step [4.1](https://docs.nvidia.com/ngc/ngc-overview/index.html#account-signup) and [4.3](https://docs.nvidia.com/ngc/ngc-overview/index.html#generating-api-key). Save the API key. -- Add the API key to the config file at ```~/.config/enroot/.credentials ``` +- Add the API key by adding these lines to the config file at ```~/.config/enroot/.credentials ``` ``` machine nvcr.io login $oauthtoken password your_api_key machine authn.nvidia.com login $oauthtoken password your_api_key ``` +Please replace ```your_api_key``` with your real API key. - Set the config path by adding the line to ```~/.bashrc``` ``` @@ -58,7 +59,7 @@ source ~/.bashrc ## Set path to user container storage -By default, your enroot containers will be saved in your ```home``` directory. On Berzelius, you have 20 GB hard drive space for ```home```. It is a better practice to put enroot containers in your project directory. +By default, your enroot containers will be saved in your ```home``` directory. On Berzelius, you have only 20 GB disk space for ```home```. It is a better practice to put enroot containers in your project directory. Add this line to your ```bashrc``` @@ -66,7 +67,10 @@ Add this line to your ```bashrc``` export ENROOT_CACHE_PATH=/proj/nsc_testing/xuan/enroot/cache export ENROOT_DATA_PATH=/proj/nsc_testing/xuan/enroot/data ``` - +To make the change valid +``` +source ~/.bashrc +``` ## Import container images @@ -88,7 +92,6 @@ For other versions, please see the Docker tags for [Pytorch](https://hub.docker. ## Create a container -I will take Pytorch from Nvidia NGC for an example. ``` enroot create --name nvidia_pytorch_22.09 nvidia+pytorch+22.09-py3.sqsh ``` @@ -107,7 +110,7 @@ enroot start --rw --mount /proj/nsc_testing/xuan:/proj/nsc_testing/xuan nvidia_p The flag ```--mount``` mounts your local directory to your container. -- You can also start a container and run your command at the same time. +- You can also start a container and execute your command at the same time. ``` enroot start --rw --mount /proj/nsc_testing/xuan:/proj/nsc_testing/xuan nvidia_pytorch_22.09 sh -c 'python path_to_your_script.py' ``` @@ -118,4 +121,4 @@ enroot start --rw --mount /proj/nsc_testing/xuan:/proj/nsc_testing/xuan nvidia_p enroot start --rw --env DISPLAY --mount /tmp/.X11-unix:/tmp/.X11-unix --mount /proj/nsc_testing/xuan:/proj/nsc_testing/xuan nvidia_pytorch_22.09 ``` -Please note that you need to use the flag ```-X``` when connecting to Berzelius. +Please note that you need to use the flag ```-X``` to set up the X11 forwarding when connecting to Berzelius.