Installing Python or R packages

Uploading datasets and visualization to dstack.ai is done via the dstack package available for both Python and R. These packages can be used from Jupyter notebooks, RMarkdown, Python and R scripts and applications.

Once you've pushed your data to dstack.ai using the dstack packages for Python and R, you can combine your datasets and visualizations into a great-looking interactive dashboards with just a few clicks. Learn more on how to push your data to dstack.ai‚Äč

Installing dstack package

The dstack package can be easily installed on of the following ways:

pip
conda
R
pip
pip install dstack
conda
conda install dstack -c dstack.ai
R
install.packages("dstack")

Sometimes pip can't resolve PyYAML dependency, so it should be installed manually:pip install pyyaml

Configuring dstack.ai profile

Note, before using the dstack for Python or R, you have to configure it with your dstack.ai profile by specifying your dstack.ai username and token:

Bash
R
Bash
dstack config --token <TOKEN> --user <USER> --global
R
dstack::configure(user = "<USER>", token = "<TOKEN>", persist = "global")

Configuring dstack profiles separately from your code, allows you to make the code safe and not include plain secret tokens.

By default, the configuration profile is stored locally in your working directory: <WORKING DIRECTORY>/.dstack/config.yaml . If you'd like to store configuration profiles in your user home directory, you have to use the --global argument with the command line or the persist argument of the R's configure function. See the snippets above.