Introducing rx: remote execution made easy

Introducing rx: remote execution made easy

Removing friction from developing on the cloud.

·

3 min read

rx is a command line tool that makes it easy to run code remotely. You can use any tools you're comfortable with locally and, at a moment's notice, run anything you're working on on a remote machine without any hassle. This lets you focus on coding and basically makes your laptop as beefy as you want with zero effort.

rx takes care of all of the busywork, including setting up a long-living cloud instance for your project, syncing your files back and forth from your machine to the cloud, and showing you any stdout/stderr your program produces.

To get started, install rx from pip:

pip install run-rx

In a similar way you run git init, run rx init in the directory that you'll be using. This directory is called your rx root. To set it up, run:

cd path/to/your/project
rx init

You'll need to log in and create a username if you haven't before. Then rx will begin to sync your local environment to your remote host. It may take several minutes, depending on the size and complexity of your project.

Once rx init is done, execute whatever you want remotely by prefixing "rx" to what you would have ordinarily run, for example:

rx python my-program.py

At this point, rx will execute python my-program.py on the remote machine. It'll stream any stdout/stderr back to your local machine and, when execution finishes, display any files that were created:

$ rx python my-program.py
...here is some stdout from my-program...
Changed:
  my-logs/some-diagnostics.txt
  my-output-pics/astronaut.png

N.b.: Seeing all of the files that have been created is especially handy when running programs like ./configure that drop files all over your tree!

If you change my-program.py locally and rerun rx python my-program.py, rx will upload your changes and run the updated version.

rx lets you focus on coding. It handles dependency management, GPU driver configuration, and keeping your remote machine patched and up-to-date. Check out the getting started documentation for more info.

Some caveats:

  • Currently, most of our efforts have gone into supporting Python environments. If you're using another language, it should work, but it might be annoying to set up. Please file an issue if you'd like help!

  • Shells are grabby! If you want to use redirection or environment variables, wrap the command in single quotes (e.g., rx 'echo $PATH > my_path').

  • You start with an allotment of free compute on a shared instance so you can get the feel of rx and see if it works for you. Once that quota runs out, you'll be prompted to subscribe. Subscribing will automatically upgrade you to a private machine.

Finally, we'd love to hear from you! Please let us know if you have any questions, comments, or run into any issues.