1. Sign in Codex with your ChatGPT account (you only need to do it once)
Open Terminal (on Mac) or Powershell (on Windows), run this command to connect to the BioHPC login node (replacing xxxxxx with your BioHPC account):
ssh -L 1455:localhost:1455 xxxxxx@cbsulogin.biohpc.cornell.edu
After you login to cbsulogin node, run this command “codex login”.
You should see an URL on the screen. Copy-paste this URL to a web browser on your laptop, and sign-in to your ChatGPT account. Follow instructions on the screen to sign in to Codex
2. Copy BioHPC’s AGENTS.md file into ~/.codex directory.
Codex should have created a Codex home directory, by default, /home/$USER/.codex/. Run this command to copy the file:
xxxxxxxxxxcp /programs/ai_pipelines/AGENTS.md /home/$USER/.codex/
3. (Optional) Install VS Code and related extensions on your laptop
This is optional. VS Code has some nice features for running AI agent.
Install VS Code on your laptop. You can download the software installer from https://code.visualstudio.com/Download. (On Windows, you can also install through the Microsoft Store, search for "Visual Studio Code" and install.)
Install the following extensions on VS Code: "Remote SSH", "Codex", "Copilot", "PDF viewer". To install an extension, open VS Code, click "View" -> "Extension", search for the extension name and click install. There might be several extensions with similar names. Here are the full name for each of these extensions:
"Codex": "Codex -OpenAI's coding agent".
"Copilot": "Github Copilot Chat" (optional)
"Remote - SSH" (from Microsoft)
"PDF viewer" (I use the one from Mathematic Inc)
(If you are on Cornell campus or through Cornell VPN)
To connect to the Linux server, press Ctrl + Shift + P, type "ssh", select "Remote-SSH: Connect to Host". Enter your assigned server: xxxxx@cbsu00000.biohpc.cornell.edu (replace xxxxx with your BioHPC user ID, and cbsu00000 with your assigned server name). You will be prompted for password. You can setup ssh key to avoid entering password everytime. (https://biohpc.cornell.edu/lab/ssh_keys.aspx connection method terminal).
(If you off Cornell campus and do not have access to Cornell VPN)
First setup an ssh tunnel. Open Terminal/Powershell, run this command: ssh -L 8031:cbsu00000:22 xxxxx@cbsulogin.biohpc.cornell.edu (replace xxxxx with your BioHPC user ID, and cbsu00000 with your assigned server name). Keep this terminal open.
Back to VS code. Setup connection to the Linux server, press Ctrl + Shift + P, type "ssh", select "Remote-SSH: Connect to Host". Enter your assigned server: xxxxx@localhost:8031 (replace xxxxx with your BioHPC user ID). You will be prompted for password. You can setup ssh key to avoid entering password everytime. (https://biohpc.cornell.edu/lab/ssh_keys.aspx connection method terminal).
To open the Terminal, click "Terminal" -> "New Terminal". If the terminal tab is hidden, click the "..." icon in the top menu bar to see it.
In the right panel, you can switch between "CODEX" (ChatGPT) or CHAT (Copilot) as agent.
To open the File Explorer, click the files icon on the left bar.