Installation#

The following article details how to run a Docker container with access to the USEncrypt® library.

Prerequisite Installations#

Before downloading the container, the following tools must be installed:

  1. AWS CLI 2

  2. Docker

Pulling the USEncrypt® Docker Container from the AWS Elastic Container Registry (ECR)#

The following instructions will allow you to pull the USEncrypt® container from the AWS ECR.

Note

If your AWS ECR token is still valid, feel free to skip step #1.

  1. Configure Your Login Credentials. If you have not yet configured your login details in the AWS CLI, you must do so using the command aws configure on your terminal. Here you will be asked to enter your AWS Access Key ID, AWS Secret Access Key, and default region name, which must be set to us-east-1.

  2. Log In to AWS ECR and Docker. Run the command: aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 715439938178.dkr.ecr.us-east-1.amazonaws.com.

  3. Pull the USEncrypt® Docker Container.

    Data Owners

    • For the data owner version of the USEncrypt® container, run docker pull 715439938178.dkr.ecr.us-east-1.amazonaws.com/usencrypt-data-owner.

    • For the Jupyter notebook version of the data owner USEncrypt® container, run docker pull 715439938178.dkr.ecr.us-east-1.amazonaws.com/usencrypt-data-owner-jupyter.

    Data Users

    • For the data user version of the USEncrypt® container, run docker pull 715439938178.dkr.ecr.us-east-1.amazonaws.com/usencrypt-data-user.

    • For the Jupyter notebook version of the data user USEncrypt® container, run docker pull 715439938178.dkr.ecr.us-east-1.amazonaws.com/usencrypt-data-user-jupyter.

Note

If unsure of which version to pull, simply use latest.

Running the USEncrypt® Standard Data Owner/Data User Docker Container (usencrypt-data-owner) or (usencrypt-data-user)#

To run an instance of the standard Docker container, simply use the following command:

For Data Owners:

docker run -it --rm 715439938178.dkr.ecr.us-east-1.amazonaws.com/usencrypt-data-owner

For Data Users:

docker run -it --rm 715439938178.dkr.ecr.us-east-1.amazonaws.com/usencrypt-data-user

This will take you to a Docker instance with Python and USEncrypt® installed. To use the library, simply start Python by using the command python3, and import USEncrypt® by using the command import usencrypt. From here, you are now able to use the library and all its associated functions in Python.

Running the USEncrypt® Jupyter Notebook Docker Container (usencrypt-data-consumer-jupyter)#

To run an instance of the Jupyter notebook version of the Docker container, simply use the following command:

For Data Owners:

docker run --rm -p 8080:8080 -v `pwd`/work:/home/work 715439938178.dkr.ecr.us-east-1.amazonaws.com/usencrypt-data-owner-jupyter

For Data Users:

docker run --rm -p 8080:8080 -v `pwd`/work:/home/work 715439938178.dkr.ecr.us-east-1.amazonaws.com/usencrypt-data-user-jupyter

This will load a Jupyter instance in your terminal, with two links printed as output. Copy and paste one of those links in a web browser and it will take you to the Jupyter notebook server home screen. From here, you can explore all our tutorials (see USEncrypt® Tutorials), which show various use-cases for the library, as well as create your own notebooks to explore the library further.

In the py-usencrypt/tutorials directory, there are 3 folders containing out Jupyter notebook tutorials:

  • 1_getting_started: Shows the basics of using USEncrypt®.

  • 2_libraries: Shows how to use USEncrypt® with other Python libraries, such as NumPy and Pandas. (See USEncrypt® + NumPy and USEncrypt® + Pandas.)

  • 3_ml: Shows how USEncrypt® can be used to training and inference in various machine learning models, such as neural networks, linear regression, \(k\)-means clustering.

To get started with USEncrypt®, feel free to look through our Quickstart and Programming with USEncrypt® guides.