Setup and installation¶
In this guide, we will help you to get up and running with Rubrix. Basically, you need to:
Install the Python client
Launch the web app
Start logging data
1. Install the Rubrix Python client¶
First, make sure you have Python 3.6 or above installed.
Then you can install Rubrix with pip
:
pip install rubrix==0.6.2
2. Launch the web app¶
There are two ways to launch the webapp:
Using docker-compose (recommended).
Executing the server code manually
a) Using docker-compose
(recommended)¶
For this method you first need to install Docker Compose.
Then, create a folder:
mkdir rubrix && cd rubrix
and launch the docker-contained web app with the following command:
wget -O docker-compose.yml https://raw.githubusercontent.com/recognai/rubrix/master/docker-compose.yaml && docker-compose up
This is the recommended way because it automatically includes an Elasticsearch instance, Rubrix’s main persistent layer.
b) Executing the server code manually¶
When executing the server code manually you need to provide an
Elasticsearch instance yourself.
This method may be preferred if you
(1) want to avoid or cannot use Docker
,
(2) have an existing Elasticsearch service, or
(3) want to have full control over your Elasticsearch configuration.
First you need to install Elasticsearch (we recommend version 7.10) and launch an Elasticsearch instance. For MacOS and Windows there are Homebrew formulae and a msi package, respectively.
Install the Rubrix Python library together with its server dependencies:
pip install rubrix[server]==0.6.2
Launch a local instance of the Rubrix web app
python -m rubrix.server
By default, the Rubrix server will look for your Elasticsearch endpoint at http://localhost:9200
.
But you can customize this by setting the ELASTICSEARCH
environment variable.
If you are already running an Elasticsearch instance for other applications and want to share it with Rubrix, please refer to our advanced setup guide.
3. Start logging data¶
The following code will log one record into a data set called example-dataset
:
import rubrix as rb
rb.log(
rb.TextClassificationRecord(inputs="My first Rubrix example"),
name='example-dataset'
)
If you now go to your Rubrix app at http://localhost:6900/ , you will find your first data set.
The default username and password are rubrix
and 1234
(see the user management guide to configure this).
You can also check the REST API docs at http://localhost:6900/api/docs.
Congratulations! You are ready to start working with Rubrix.
Please refer to our advanced setup guides if you want to:
setup Rubrix using docker
share the Elasticsearch instance with other applications
deploy Rubrix on an AWS instance
manage users in Rubrix