Installation¶
This page describes how to install torc-client
and its dependencies. torc-client
is a
Python package that provides a command-line interface (CLI), a terminal user interface (TUI), and
a Python library for interacting with the Torc API server. It also provides a Torc worker that can
run jobs on local or HPC compute nodes.
Create a Python 3.11+ virtual environment. This example uses the
venv
module in the standard library to create a virtual environment in your home directory.You may prefer
conda
ormamba
.If you are running on NREL’s HPC, you may need to
module load python
first.$ python -m venv ~/python-envs/torc
Activate the virtual environment.
$ source ~/python-envs/torc/bin/activate
Whenever you are done using torc, you can deactivate the environment by running
deactivate
.Install the Python package
torc
.$ pip install torc-client
Optionally install the Julia client package.
$ julia # optionally specify an environment with --project $ using Pkg $ Pkg.add(PackageSpec(url="git@github.com:NREL/torc.git", rev="v0.6.4", subdir="julia/Torc"))
Optionally install
jq
from https://stedolan.github.io/jq/download/ for parsing JSON. This tool is very useful when sending API requests withcurl
or dumping torc output to JSON.