Quickstart Guide
info
This guide is for V3.0 and later.
AWS Marketplace
You can rapidly get up and running by subscribing to the AWS Marketplace and automatically deploying to either AWS EKS or AWS ECS. Check out AWS Marketplace Container Deployment Guide for more information.
Full Customer License
Follow the steps below if you have a full customer license to get started quickly.
Logging into the Customer Portal
When you are onboarded, a customer portal account will be created for you. In the portal you can find helpful links, download your license file and instructions on how to login to our container registry and pull the latest container image.
If you haven't received this information yet during your onboarding, please contact our customer support team via your dedicated Slack channel, or at support@private-ai.com
Getting the Container
Once you've logged into the customer portal, you will find some commands to get the latest container. The container is distributed via a container registry on Azure, which you can login to with the command found in the portal that looks like this:
docker login -u INSERT_UNIQUE_CLIENT_ID -p INSERT_UNIQUE_CLIENT_PW crprivateaiprod.azurecr.io
Please reach out to our customer support if you are experiencing issues.
Getting a License
When you are logged into the customer portal, you should find the license file (or files) assigned to your account in the top right of the main page. There will be a download link beside the file along with information about the license tier and expiry date.
Starting up the Container
Starting with 3.0, license files are used for authentication. To start the container, please mount the license file as follows:
docker run --rm -v "full path to your license.json file":/app/license/license.json \
-p 8080:8080 -it crprivateaiprod.azurecr.io/deid:<tag>
For example:
docker run --rm -v "/home/johnsmith/paisandbox/my-license-file.json":/app/license/license.json \
-p 8080:8080 -it crprivateaiprod.azurecr.io/deid:3.0.0-cpu
Sending Requests
You can then make a request to the container like this:
curl --request POST --url http://localhost:8080/v3/process/text --header 'Content-Type: application/json' --data '{"text": ["Hello John"]}'
Processing Files
Processing files can be done by sending base64-encoded files to the /v3/process/files/base64
route:
import base64
import requests
filename_in = "<input filename>"
filename_out = "<output filename>"
# Read the file and do base64 encoding
with open(filename_in, "rb") as f:
b64_file_content = base64.b64encode(f.read())
b64_file_content = b64_file_content.decode("utf-8")
# Make the request and load the results as JSON
r = requests.post(url="http://localhost:8080/v3/process/files/base64",
json={"file": {"data": b64_file_content, "content_type": "image/jpg"}})
results = r.json()
# Decode and write the file to disk
with open(filename_out, "wb") as f:
f.write(base64.b64decode(results["processed_file"]))
It is also possible to send URIs instead to the /v3/process/files/uri
route, avoiding the overhead of base64 encoding and avoiding sending any sensitive information in the request. Please see Running the Container for details.