You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to nicely run as a batch job in cirrus, the Dockerfile needs to copy both task.py and version.py to /usr/local/bin so it is easily accessible.
build the current Dockerfile with docker build . -t tasktemplate1
run in interactive mode: docker run -it tasktemplate1 bash1
set AWS_DEFAULT_REGION (required here, is set with batch normally) - AWS_DEFAULT_REGION=us-east-1
try to execute task.py
You'll see this:
bash-4.2# export AWS_DEFAULT_REGION=us-east-2
bash-4.2# task.py -h
Traceback (most recent call last):
File "/usr/local/bin/task.py", line 16, in <module>
from version import __version__
ModuleNotFoundError: No module named 'version'
With this change you will not have this issue:
bash-4.2# export AWS_DEFAULT_REGION=us-east-1
bash-4.2# task.py -h
usage: task.py [-h] {local,cirrus} ...
cirrus task
positional arguments:
{local,cirrus}
local Locally process (development)
cirrus Process Cirrus STAC Process Catalog
optional arguments:
-h, --help show this help message and exit
bash-4.2#
In order to nicely run as a batch job in cirrus, the Dockerfile needs to copy both
task.py
andversion.py
to /usr/local/bin so it is easily accessible.COPY [ "task.py", "version.py", "/usr/local/bin" ]
The text was updated successfully, but these errors were encountered: