Run Script (tines-command-runner)
This page documents how to configure your tines-command-runner instance using environment variables. For platform-specific deployment instructions, consult our guides to deploying tines-command-runner with AWS Fargate or Docker Compose.
Configuring tines-command-runner
Tines-command-runner exposes settings for controlling Run Script action execution using environment variables. See the platform-specific pages linked above for more on setting environment variables in tines-command-runner using your platform of choice.
Basic settings
LOG_LEVEL- Configures the logging level for the Python harness. Set toDEBUG,INFO,WARNING,ERROR, orCRITICAL(default:INFO). SetLOG_LEVEL=DEBUGto enable verbose debug logging for troubleshooting. Logs are written to/tmp/tcr-logs/harness-{environment_id}-{stdout,stderr}.log.
Package indexes
These settings can be changed to use your own, custom index for Python packages.
PIP_INDEX_URL- Specifies the primary Python package index used for package resolution and download. Default:https://pypi.org/simple.PIP_EXTRA_INDEX_URL- Specifies a fallback Python package index to be used if the primary index is offline or missing a desired package. Default:http://pypi-server:8080/simple/, a local pypi server that runs alongside your tines-command-runner container.NO_PIP_INDEX- If set totrue, blocks access to all package indexes, even if they are specified byPIP_INDEX_URLorPIP_EXTRA_INDEX_URL, restricting dependencies to those bundled with the Python image (see "Pre-installed packages" below).TRUSTED_HOST- A hostname for a package index that can be accessed via unsecured HTTP when fetching packages. Default:pypi-server
Pre-installed packages
The Python packages below are included in our bundled Python image by default. These packages are available even if NO_PIP_INDEX=true. More packages may be added to this list in the future, and the installed version of these packages may change.
These packages are not available by default to user-provided custom runtimes. Custom runtimes are fully self-contained and must bundle all required dependencies.
annotated-types
anyio
beautifulsoup4
boto
boto3
click
cryptography
django
fastapi
flask
grpcio
grpcio-reflection
grpcio-tools
h11
idna
jupyter
lxml
matplotlib
networkx
nltk
numpy
openpyxl
pandas
paramiko
plotly
protobuf
pyarrow
pyopenssl
pydantic
pydantic_core
pytest
pytz
requests
scikit-learn
scipy
seaborn
setuptools
sniffio
sqlalchemy
starlette
statsmodels
sympy
typing_extensions
uvicorn
xlrdNote: All transitive dependencies required by the above packages are also automatically downloaded and available for use. This means the actual number of available packages is larger than this explicit list, as each package brings in its own required dependencies during the build process.
Performance and scaling
Timeouts
RUN_SCRIPT_MAX_TIMEOUT- Controls the maximum runtime of scripts. Scripts running for longer than this number of seconds will be killed, and the task will be marked as a failure. Default:60(sixty seconds)
Parallel execution
By default, each run-script action on a container can run two tasks concurrently before further tasks begin to queue, and a tines-command-runner container can run up to ten concurrent tasks in total before tasks for any environment will begin to queue. You can increase the number of parallel executions by either adding more containers or increasing the parallel execution limit within the container.
Trade-offs
Custom runtimes
Actions using custom runtimes often include files that are modified when the script runs. For this reason, by default, custom runtime actions execute one task at a time. If your actions don't modify any files, or if you're confident your script handles coordinating access to any files it touches with other tasks, you can safely turn on parallel execution.
Configuration
TINES_COMMAND_RUNNER_PARALLEL_RUNScontrols the number of tasks a given action can run concurrently. Tasks for that action that are submitted while this many tasks are running will queue until a running task completes. Default:2TINES_COMMAND_RUNNER_THREADScontrols the total number of tasks the tines-command-runner container can run at once. If more tasks come in while this many tasks are running, runs will begin to queue regardless of whether the requested action has reached the limit set byTINES_COMMAND_RUNNER_PARALLEL_RUNS. Default:10TCR_ENABLE_PARALLEL_CUSTOM_ENVIRONMENTSenables parallel execution for custom runtimes when set totrue. Make sure your scripts run safely when running concurrently before enabling this. When enabled, custom runtimes will be limited to the number of concurrent runs specified inTINES_COMMAND_RUNNER_PARALLEL_RUNS. Default:false