Reputation: 4052
I am trying to create an API and looking to use Flask/AWS Lambda to do so. As best as I can tell, Zappa looks like the best (only?) deployment option.
The problem is that I use conda to manage my environments and Zappa does not currently have a version that can work in conda. It requires virtualenv.
My questions are:
Upvotes: 1
Views: 1452
Reputation: 3112
I faced the same issue. Fixed it by setting the VIRTUAL_ENV
environment variable and it worked.
Assuming you have a conda environment created as follows.
conda create -n zzz python=3.7
conda activate zzz
Before zappa deploy
ensure you do the following.
(zzz) ➜ which python
/home/lokesh/miniconda3/envs/zzz/bin/python
# Remove the /bin/python and copy the rest
export VIRUTAL_ENV=/home/lokesh/miniconda3/envs/zzz
Upvotes: 4
Reputation: 6314
Is this in the context of serving machine learning models on AWS Lambda?
If so, I wrote a library called Thampi which uploads your model and your conda environment to AWS Lambda and abstracts away the DevOps part of model serving. The caveat is that your conda requirements file has to be manually written.
Upvotes: 0
Reputation: 316
You can install it using conda:
conda install -c mathieu zappa
Upvotes: 2