This article contains documentation about the various functions and features in the brand new Polly Notebook.

1. Polly Functions Documentations

Below are the details for the various Polly functions and their descriptions and input/output examples.

List Project File
List Project File
Download Project File
Download Project File
Save file to Project
Save file to Project

2. Polly Offerings

For accessing the Polly Offerings menu, click on the Polly Offerings button in the menu bar.

Polly Offerings
Polly Offerings

Polly Offerings gives you the following features

  1. Terminal
    The terminal can be used for the following tasks
    • Installing Python or R packages (as described later)
    • Managing system binaries
    • Working with code repositories hosted on GitHub, Bitbucket, etc.
    • Managing system configurations (won’t persist once the session is closed)
  2. File Explorer
    You will be able to view and edit files present in the directory where the notebook is running. The following is the list of accessible files   
    • Files imported from Project files using the notebook
    • Files created in the notebook
    • Files present in the docker

3. Terminal Commands Documentation

Any installation or changes done using the terminal will not persist after the session (notebook) is closed. The next time you open the notebook, the same installations will have to be done again.  We are working on getting these package installations to persist even if the session (notebook) is closed in the upcoming updates.

Python3 Env

# For installing packages DON'T forget to use sudo. It will not ask for password
> sudo pip install <package-name>

# System binaries
> sudo apt install <package-name>

# If the above command outputs package not found, you can run this command to update the system package indices
> sudo apt-get update

R Env

For R package installation

# You can install R package by opening R terminal
> sudo R
# Install packages using the following command
> install.packages(c('<pkg-name>'), dependencies=TRUE, repos=<Enter your choice cran mirron link>)
# For cran mirror link: You can use either of your choice or this one: "https://cran.cnr.berkeley.edu/"
# For importing the library using terminal, use the following command (Note - You can also call the libraries from notebook as usual)
> library(<pkg-name>)

For system binaries

# System binaries
> sudo apt install <package-name>
# If the above command outputs package not found, You can run this command to update the system package indices
> sudo apt-get update

Pollyglot Env

# This env has python3 env and R env
# So the forpython3 env and R env work for this environment

Python2 Env

# Don't forget to use sudo. It will not ask for password
sudo pip install <package-name>

# System binaries
sudo apt install <package-name>

# If the above command outputs packagenot found, you can run this command to update the system package indices
> sudo apt-get update

4. Things to Note

AWS CLI is pre-installed in all the docker environments that Polly supports. But AWS CLI has not been configured with any type of AWS access key, secret token, and region configuration. Any user who is using the AWS CLI tool has to configure it with their access credentials and token, only then would it work. This is done for security purposes.

Having pre-configured AWS CLI can give rise to potential security risks and vulnerabilities. Configuring the AWS CLI on the fly will not be saved anywhere because as soon as the user will close the notebook, the docker will stop and will get deleted from the instance. Thus all the temporary session data will also be erased.

Leave a Reply

Your email address will not be published. Required fields are marked *