Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 2 Current »

Commands

The script will use a commands.json from the Config Directory to access the command from minion or running the container in standalone.

The format of the json is:

{
  "commands": {
     "command_name": {
       "env": { //optional
         "PYTHONPATH": "/app/script/lib:${PYTHONPATH}",
       },
       "cmd": "python3 -u main.py",
       "option_prefix": "-", //optional, by default minion will use "--" so change to short "-",
       "minion_use_taskfiles": True, //optional, by default False
       "minion_message_template": "python -u main.py /app/Models ${option:video-file} ${option:output-transcription-file} ${arg:1}", //optional, template conversion for minion messages
     }
  }
}

Docker install

You need to clone the repository on the build (jenkins) and never on the container due git permissions to download, next you need to add the following to the Dockerfile

RUN pip --install "boto3>=1.16.52"

ADD minion-simple-config /opt/minion-simple-config
ADD minion-simple-cmd-launcher /opt/minion-simple
RUN chmod +x /opt/minion-simple/bin/minion-entrypoint.sh

ENTRYPOINT ["/opt/minion-simple/bin/minion-entrypoint.sh"]

The first line is to optimize the requirements of project, but if changed, will need to change Dockerfile.

The minion-simple-config is an optional dir, but is recommended, check the Minion Simple Config Directory for examples

Minion Simple Config Directory

This is a special directory where some configuration / data is stored, the following files can be stored:

File

Description

git-commit-id.txt

The commit built, generate on jenkins with:
git rev-parse HEAD > app/git-commit-id.txt

commands.json

Bitbucket Repository

https://bitbucket.org/touchcastllc/minion-simple-cmd-launcher

  • No labels