TIBCO Spotfire® Service Python Installation and Administration

Building a Spotfire Package (SPK) for Python Packages from a Docker Image on Windows

You can build a Spotfire package (SPK) using a Docker image on Windows, and then place the SPK on a Spotfire Server running on Linux.

About this task

Perform this task from the command line on a Windows computer.

Before you begin

Before you begin, complete the following tasks.

  1. Download TIBCO Spotfire® Statistics Services installation for your operating system from the TIBCO product site edelivery.tibco.com (license and account required). Spotfire® Statistics Services includes the Spotfire Service for Python.
    Note: You do not need to install Spotfire Statistics Services.
  2. In the Spotfire Statistics Services downloaded bundle, find the component Spotfire Service for Python
  3. Extract the contents of the Spotfire Service for Python installation archive.

Procedure

  1. Create the file requirements.txt and place it in the same directory from where you are running the spotfire-spk script.
    The file requirements.txt contains a list of packages, with their version numbers, that are included in the SPK. For example:
    ####### example-requirements.txt #######
    		#
    scipy==1.6.3
    matplotlib == 3.4.1
    statsmodels == 0.12.2
    		
  2. Call the following commands.
    set PYTHON_VERSION=3.8.12
    docker build --build-arg PYTHON_VERSION -t python-build-base:%PYTHON_VERSION% python-build-base
  3. Build the SPK.
    spotfire-spk <python-build-base-tag> [arguments to spotfire.spk module]
    spotfire-spk 3.8.12 packages python-packages.spk requirements.txt
    The file python-packages.spk containing the packages specified in requirements.txt is created.

What to do next

Add the SPK to the Spotfire Server Deployment area, and then validate and save the area. See Adding Software Packages to a Deployment Area and Updating Services in the TIBCO Spotfire® Server Installation and Administration guide for more information. If you have specified the --analyst flag in the arguments to the spotfire.spk module, then the next time the Spotfire Analyst users connect to the Spotfire Server, they are prompted to update their installations with the new packages. Business authors and consumers connecting to Spotfire from a web browser can view analyses with data functions that use the functions in the packages.