Environment_Setup_Guide - Lin-Brain-Lab/machine_learning GitHub Wiki
Environment Setup Guide
1. IDE Setup (VS Code)
This section is for users who do not have access to the Sunnybrook VPN or on-site network but want to use an IDE (Visual Studio Code) to connect to the lin1 server and access compute resources.
1. Install the Correct Version of VS Code
Starting with VS Code 1.86, the Remote-SSH extension requires glibc 2.28 or later. However, the lin1 server only has glibc 2.17.
To avoid compatibility issues:
- Download and install VS Code 1.85: https://code.visualstudio.com/updates/v1_85
- Downgrade the Remote-SSH extension to a version compatible with VS Code 1.85.
2. Configure SSH
Open the Command Palette:
- macOS:
Cmd + Shift + P - Windows/Linux:
Ctrl + Shift + P
Type: Remote-SSH: Open SSH Configuration File
Select the config file to edit (usually ~/.ssh/config).
Add the following configuration:
Host robin
HostName 142.76.1.189
User username
Host lin1
HostName 142.76.29.235
User username
ProxyJump robin
3. Connect to lin1
Open the Command Palette again:
- macOS:
Cmd + Shift + P - Windows/Linux:
Ctrl + Shift + P
Type: Remote-SSH: Connect to Host
Select lin1 from the list.
You will be prompted to enter your passphrase twice:
- Once for
142.76.1.189(robin) - Once for
142.76.29.235(lin1)
If successful, the lower-left corner of VS Code should display: SSH: lin1.
2. Conda Environment Setup
1. Go to Your Home Directory
cd ~
pwd # should print something like /home/username
2. Download the Anaconda Installer
For example, for 64-bit Linux:
wget https://repo.anaconda.com/archive/Anaconda3-2025.06-0-Linux-x86_64.sh
(If you prefer a lighter version without bundled packages, you can install Miniconda instead.)
3. Run the Installer
bash Anaconda3-2025.06-0-Linux-x86_64.sh
During installation:
-
When asked for the install location, press Enter to accept the default:
/home/username/anaconda3 -
When asked whether to initialize Anaconda by modifying your shell profile (e.g.,
~/.bashrc), type yes.
4. Reload Your Shell Configuration
source ~/.bashrc
This ensures the conda command is available immediately in your current shell.
5. Verify the Installation
conda --version
which conda
Expected output:
/home/username/anaconda3/bin/conda
6. Create and Activate an Environment
conda create -n myenv python=3.8
conda activate myenv