Custom Python Library Setup for Pulse-IT/Automate-IT
Configuration:
Copy the .whl File:
Store the ‘.whl’ file in a local folder on the host system.
Map the Folder Using a Volume:
Modify the ‘compose-local.yaml’ file to include the volume mapping: volumes:
- /home/user/custom-libraries:/app/custom-libraries
Update the Environment Configuration:
Add the local path to the worker local.env
file:
CUSTOM_LIBRARIES_DIR = /app/custom-libraries
If applied to a Windows worker: Add the local path in the [paths] section of the agent.ini file [paths] CUSTOM_LIBRARIES_DIR = path to custom virtualenv site-packages folder
Restart the worker:
Restart the worker to apply the changes.
Workflow Player Service Behavior:
On startup, the workflow_player
service will check the ‘/app/custom-libraries’ folder.
The service will unzip the .whl
file into the folder ‘app/custom-libraries/.cache/’.
Each launched workflow will add the contents of the ‘.cache’ folder to ‘sys.path’ to ensure package accessibility.