> For the complete documentation index, see [llms.txt](https://docs.robbie.run/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.robbie.run/running-your-experiments-on-robbie/command-runner.md).

# Command Runner

The Robbie command runner enables users to run arbitrary UNIX/Linux shell commands on a remote high-performance computing machine, including those with GPUs. For example, the command runner can run Python scripts (e.g., python file.py), fine-tune large language models (LLMs), or perform hyper-parameter turning with tools like Weights and Biases.

You can run simple command like:

* python file.py
* pip install -r requirements && python main.py
* python -c ‘import os; os.getcwd()’

And even more sophisticated commands like:

* tune run lora\_finetune\_single\_device --config llama3/8B\_lora\_single\_device
* wandb agent sweep\_id

Prerequisites: To use the Robbie Command Runner, you need to:

* Place all files you need on the remote machine in a local directory
* Run ***robbie run –i*** and interactively build a configuration
* During the interactive setup, enter the commands to be run
* If you would like to see the detailed output from the remote machine, specify the ***–tail*** option
* Please note that commands run in sequence, without concern for the success for failure of the previous command. For example, if you specific three individual commands like this:
  * cd nowhere
  * python file.py

The second command ‘python file.py’ will run even if the command “cd nowhere” fails.

To sure that commands run only after the previous success, use the && convention.

Thus: \`cd nowhere\` && \`python file.py\`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.robbie.run/running-your-experiments-on-robbie/command-runner.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
