The following article details how to run a Docker container with access to the USEncrypt® library.
Before downloading the container, the following tools must be installed:
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.
If your AWS ECR token is still valid, feel free to skip step #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 configureon 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
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.
Pull the USEncrypt® Docker Container.
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.
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.
If unsure of which version to pull, simply use
Running the USEncrypt® Standard Data Owner/Data User Docker Container (
usencrypt-data-owner) or (
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 (
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.
py-usencrypt/tutorials directory, there are 3 folders containing out Jupyter notebook tutorials:
1_getting_started: Shows the basics of using USEncrypt®.
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.