1

we want to create a IBM cloud function with a python virtualenv. The python virtualenv is quite big (220 MB) and we are not allowed to push images to docker hub (the workaround described here: http://jamesthom.as/blog/2017/08/04/large-applications-on-openwhisk/).

Is there really no way to create this as a cloud function?

Thx

tdeer
  • 135
  • 1
  • 6
  • did you consider/can you use the hybrid approach where you have a very generic base image on dockerhub that includes just the requisite packages and then use a much smaller zip file to contain your proprietary code? If that works for you then you can create an action like this: `wsk action create myFn some.zip --docker generic-image-name` – user6062970 Jan 20 '19 at 16:07
  • yes, with my private account I can do it this way. But I am not allowed to use it for business. Looking forward to a better way to solve this. Thx – tdeer Jan 20 '19 at 16:16

1 Answers1

1

You can extend the base python image add the pip packages and any libraries or utilities to the image without your action code or secrets and push to dockerhub.

Then create the action with a zip archive or playing .py file in combination with the docker image

action update myaction mypython.py —docker myrepository/myextendedimage:1.0.0

csantanapr
  • 5,002
  • 2
  • 19
  • 15