redun icon indicating copy to clipboard operation
redun copied to clipboard

How to execute in local containers ?

Open Melkaz opened this issue 1 year ago • 1 comments

Hi !

When attempting to run Docker containers locally, I face this error:

  File "/home/user/.local/lib/python3.8/site-packages/redun/executors/aws_utils.py", line 64, in get_aws_env_vars
    creds = session.get_credentials().get_frozen_credentials()
AttributeError: 'NoneType' object has no attribute 'get_frozen_credentials'

Do we have to set-up AWS variables if we want to run locally ?

Config:

[executors.my_executor]
type = docker
image = 'ubuntu:20.04'
scratch = scratch

Code:

from redun import script, task, Scheduler

@task(executor="my_executor", version='1')
def task1():
    return script(
        "echo hello"
    )

@task(version='1')
def main():
    return task1()

if __name__ == "__main__":
    scheduler = Scheduler()
    result = scheduler.run(main())
    print(result)

Thanks :)

Melkaz avatar Jun 27 '23 07:06 Melkaz