Using Codex with OnDemand Apps
Codex is a terminal-based tool, so from Carina OnDemand you run it through an app’s built-in terminal. Because these sessions already run on a compute node (not a login node), you don’t need a separate srun step first.
These app terminals last as long as your OnDemand session. They aren’t subject to the 30-minute limit of Clusters > Carina Shell Access, which runs on a login node and isn’t suitable for Codex.
The Command
Once you have a terminal open in any of the apps below, run:
ml codex
codex
If you haven’t logged in to Codex on Carina yet, run codex login --device-auth first and follow the login steps. You only need to do this once; after that, codex will start without asking you to log in again.
Opening a Terminal
VS Code: Terminal > New Terminal (or Ctrl+`).
RStudio: The Terminal tab next to the Console pane.
JupyterLab: From the Launcher, open a Terminal (or File > New > Terminal).
MATLAB: The MATLAB OnDemand session is a graphical environment and doesn’t include its own terminal panel. Run Codex alongside it from a separate session instead — for example, SSH into Carina and request a compute node with srun — while your MATLAB session keeps running independently.