Additional dependencies must be included inside a package
directory at the root of your archive/project:
Standard dependencies
You may install your dependencies to the package
directory:
Or with a requirements.txt
file:
Specific libraries (with needs for specific C compiled code)
In some cases, you might need to install libraries which require specific C compiled code such as (for example):
numpy
tensorflow
pandas
scikit-learn
- ...
Our Python runtimes run on top of alpine linux
environments, for these specifics dependencies, you will have to install your dependencies inside a docker container
, with a specific image, that we are providing to our users.
You may run the following command from the root of your project to install your dependencies before uploading your source code and deploying your function:
This command will run pip install
with given requirements.txt
file inside a docker container
compatible with our function runtimes, and pull the installed dependencies locally to your package
directory.
As these dependencies have been installed on top of alpine linux
with our compatible system libraries
, you will be able to upload your source code and deploy your function properly.
Note that the example below uses python3
runtime, but you can easily change the docker image from rg.fr-par.scw.cloud/scwfunctionsruntimes/python-dep:3.10
to rg.fr-par.scw.cloud/scwfunctionsruntimes/python-dep:3.8