Welcome to the Compox documentation!
Compox
Compox is a simple Python execution engine for Tescan applications. It’s purpose is to run data processing algorithms written in Python on the server and report the results to the client application such as Tescan 3D Viewer or Picannto.
See the GitHub pages for full python API reference, docs and tutorials!
Installation
Compox can be installed through PyPI:
pip install compox
You can also install the server by cloning this repository and installing it from source.
Note that some additional dependencies, such as MinIO executable for your operating system, will be downloaded on the first run of the server.
Running the server
Once installed into your Python environment, Compox can be run using the compox command. This command is available in the virtual environment
created during the setup process. Run the following command to list the available commands:
compox --help
It’s recommended to start with generating an initial configuration file with compox generate-config. See the configuration options section below.
To see the usage of the generate-config command, you can run:
compox generate-config --help
To run the Compox, use the following command:
compox run --config /path/to/config.yaml
Deploying algorithms
See (Algorithm development tutorial) for information about target structure of the deployable algorithms.
Once your algorithm is ready, you can use the compox deploy-algorithms command to deploy it to your server.
To see the usage of the deploy-algorithms command, you can run:
compox deploy-algorithms --help
This command will read the algorithm definitions from the folder specified in your configuration file with the deploy_algorithms_from key
and deploy them to the server. For example:
compox deploy-algorithms --config /path/to/config.yaml
Note that the server does not need to be running in order to deploy the algorithms.
Configuration
The server uses pydantic settings for configuration. The options can be either set as runtime arguments, in a yaml file, or using the COMPOX__ environment variables, in corresponding order of precedence.
Ensure all paths and URLs are correctly set before running the application.
Adjust CUDA settings based on hardware capabilities.
Logging paths should be accessible by the application to prevent errors.
See the configuration reference below for detailed configuration options.
Configuration reference
Compox Configuration Reference
Section |
Field |
Default |
Description |
|---|---|---|---|
|
|
The main server port used to make requests |
|
|
|
Directory for algorithm deployment sources. |
|
|
|
Path to the main log file (supports dynamic prefixes). |
|
|
|
Optional config path override. |
|
|
|
|
Product display name. |
|
|
|
Tags attached to the server. |
|
|
|
Name of the corporate group. |
|
|
|
Full name of the organization. |
|
|
|
Domain used in server configuration. |
|
|
|
Enables/disables GUI menu for algorithm management. |
|
|
|
Enables/disables systray GUI integration. |
|
|
Path to the installed package resource |
Path to the systray icon (supports dynamic prefixes) |
|
|
|
Device used for model inference ( |
|
|
|
Comma-separated list of visible CUDA GPUs. |
|
|
|
Prefix applied to object store collections. (useful for AWS s3 store, where unique bucket names are needed) |
|
|
|
Number of days until stored datasets expire. |
|
|
generated with |
Generated access key for storage backend. If |
|
|
generated with |
Generated secret key for storage backend. If |
|
|
|
Selected backend provider. |
|
|
|
Whether to start a local MinIO server. |
|
|
|
MinIO service port. |
|
|
|
MinIO admin console port. |
|
|
|
Path to the MinIO binary (accepts dynamic prefixes). |
|
|
|
Storage directory used by MinIO (accepts dynamic prefixes). |
|
|
|
Optional AWS compatibility region. |
|
|
|
Optional domain override for S3 compatibility. |
|
|
Derived from |
Computed as |
|
|
|
AWS backend selection. |
|
|
|
Optional override for S3 endpoint URL. |
|
|
|
AWS region (e.g. |
|
|
|
Domain used for S3-style URLs. |
Some fields in the Compox configuration (such as log_path, icon_path, etc.) support dynamic prefixes that resolve to OS-specific or runtime-specific paths. This allows for portability across platforms (e.g., Windows, Linux) and between development and production environments.
Supported Prefixes
Prefix |
Meaning (Resolved To…) |
|---|---|
|
A platform-dependent log directory: |
- Windows: |
|
- Linux/macOS: |
|
|
A system-wide data directory (Windows only): |
- e.g., |
|
- On Linux/macOS, defaults to |
These are resolved at runtime in the Settings.parse_paths() validator method.