Pictofit / Compute Server / 1.6.0 / Getting Started

Getting Started

To use native pictofit functionality like 2D or 3D Mix and Match with the Pictofit Web-SDK there is a need for a compute server to be running, which can handle a various amount of requests to cover desired use cases.

Pull the compute server

We will provide you with a deploy token which can be used to login to our public registry and pull images.

To authenticate to the gitlab registry use the following command:

docker login -u <USERNAME> -p <TOKEN> registry.gitlab.com

You can then pull the latest compute server image from the registry:

docker pull registry.gitlab.com/reactivereality/public/registry/pictofitcore-web-computeserver:latest

Configuration options

After you successfully pulled the image from the registry you will not be able to run it. There are a few environment variables that can be set when running the server:

PORT=8000:This environment variable defines the port on which the server will be running inside the container. Make sure this port lines up with the exposed ports of the container. The port defaults back to 8000 if nothing else was specified.

AUTHENTICATION_TOKEN="<TOKEN>": The auth token which needs to be passed in the header of each request sent to the compute server. This token uses the bearer scheme.

CAUTION: If no no token was set, all endpoints will be accessible without authentication!

CACHE_SIZE_LIMIT_BYTES=1073741824: This environment variable defines the maximum cache limit in bytes that should be stored on the compute server. Defaults to 1GB if none was set.


As of version v1.6.0 content behind provided asset urls is cached into a local caching storage. Before downloading an asset, the compute server will check the Content-MD5 header of the resource url and compare it against the local cache. If the checksum matches if one of the cached ones, it will reuse this file and just otherwise download it.

If no Content-MD5 is present, the url (instead of the checksum) will be cached for 24 hours. As a consequence the compute server will not notice any changes, and also not redownload to the file behind the url it during this timeframe.

Run the compute server

Example with docker-compose.yml:

version: "3"
    container_name: pictofit-computeserver
    image: registry.gitlab.com/reactivereality/public/registry/pictofitcore-web-computeserver:latest
      - "${PORT}:${PORT}"
    env_file: .env
    restart: always
The .env file:
Boot the server up with: docker-compose up [--detach]

© 2014-2020 Reactive Reality AG