lithops-cloud / lithops

A multi-cloud framework for big data analytics and embarrassingly parallel jobs, that provides an universal API for building parallel applications in the cloud ☁️🚀
http://lithops.cloud
Apache License 2.0
320 stars 105 forks source link

cpu config for code engine doesn't take effect #504

Closed shiyan0109 closed 3 years ago

shiyan0109 commented 3 years ago

on lithops release 2.2.14

lithops_config file

code_engine:
    kubectl_config: xxx
    docker_user: xxx
    cpu: 200m

code

import lithops

iterdata = ['Gil', 'Dana', 'John', 'Scott']

def add_value(name):
    return 'Hello ' + name

if __name__ == '__main__':
    lt = lithops.FunctionExecutor(mode="serverless",
            backend='code_engine',
            log_level='DEBUG')
    lt.map(add_value,  iterdata)
    print (lt.get_result())

Check the jobDefinition created by the code automatically

 resources:
          requests:
            cpu: "1"
            memory: 512Mi

I expect the resource.requests.cpu is set to 200m instead of 1 (default value)

JosepSampe commented 3 years ago

@shiyan0109 Some weeks ago, set the cpu size in millicpu units caused problems in code engine. Try using a float value, for example in your case 0.2