From cdcad7850dc147140067d7ff1fe7324319547426 Mon Sep 17 00:00:00 2001 From: mina5rovic Date: Tue, 24 Mar 2026 16:58:44 +0100 Subject: [PATCH 1/2] Add custom nvm setup on cluster to FAQ --- docs/FAQ.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/docs/FAQ.md b/docs/FAQ.md index 6e59e09b7..f47b3424a 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -50,3 +50,50 @@ Firewall settings can sometimes block npm's network requests, preventing it from 1. Temporarily disable the firewall. If npm works, the firewall is the cause. 2. Identify the specific firewall rule that is blocking npm and adjust it. 3. Make sure your firewall allows outbound HTTPS (port 443) connections to `registry.npmjs.org`. + +### Custom `nvm` Setup on Cluster + +This guide explains how to install and use `nvm` in a cluster environment with persistent storage. + +#### Goals + +- Install `nvm` in your persistent home directory +- Make it work across pods +- Ensure it is **not globally loaded** for other users +- Automatically load it for your shell (`zsh`) + +--- + +#### Step 1 — Set install location +``` +export NVM_DIR="/mloscratch/homes/USERNAME/.nvm" +``` +#### Step 2 — Install nvm +``` +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash +``` +#### Step 3 — Load nvm (test it) +``` +source "$NVM_DIR/nvm.sh" +nvm --version +``` +#### Step 4 — Configure zsh (IMPORTANT) +Open zsh config file: +``` +vi /mloscratch/homes/USERNAME/.shell/.zshrc +``` +Add this near the top or after plugins: +``` +export NVM_DIR="/mloscratch/homes/USERNAME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh" +``` +#### Step 5 — Reload shell +``` +source /mloscratch/homes/USERNAME/.shell/.zshrc +``` +#### Step 6 — Verify everything +``` +which node +nvm ls +node -v +``` \ No newline at end of file From 644063b237b5e8f92b344e4e1ecd7b48d03f19cc Mon Sep 17 00:00:00 2001 From: mina5rovic Date: Tue, 31 Mar 2026 17:27:10 +0200 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Julien Vignoud <33122365+JulienVig@users.noreply.github.com> --- docs/FAQ.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/FAQ.md b/docs/FAQ.md index f47b3424a..03902a79b 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -51,9 +51,9 @@ Firewall settings can sometimes block npm's network requests, preventing it from 2. Identify the specific firewall rule that is blocking npm and adjust it. 3. Make sure your firewall allows outbound HTTPS (port 443) connections to `registry.npmjs.org`. -### Custom `nvm` Setup on Cluster +### Custom `nvm` setup on EPFL's RCP Cluster -This guide explains how to install and use `nvm` in a cluster environment with persistent storage. +This guide explains how to install and use `nvm` on EPFL's RCP cluster environment with the MLO lab's persistent storage. We assume that you are following the [lab's workflow](https://github.com/epfml/getting-started) and are using `zsh`. #### Goals