- Python >=3.8
- Node.js >= 18.0
pip install fal-serverless
After installation is complete, you can authenticate:
fal-serverless auth login
npm install
Generate a secret key for key-based authentication
fal-serverless key generate
Set the generated key ID and secret as environment variables:
export FAL_KEY_ID="your-key-id" FAL_KEY_SECRET="your-key-secret"
The web endpoint uses Google Cloud Storage for saving the inference results. So it needs access to a service account json. You can provide it to fal-serverless like this:
fal-serverless secrets set GCLOUD_SA_JSON "$(cat path-to-my-service-account.json)"
fal-serverless function serve serverless/app.py edit_image --alias edit_image
fal-serverless function serve serverless/app.py make_masks --alias make_masks
And set the provided URL as an environment variable:
export MASK_FUNCTION_URL=your_mask_endpoint_url EDIT_FUNCTION_URL=your_edit_endpoint_url
You can also set these in .env.local
file:
FAL_KEY_ID=key_id_value
FAL_KEY_SECRET=key_secret_value
MASK_FUNCTION_URL=mask_endpoint_url
EDIT_FUNCTION_URL=edit_endpoint_url
npm run dev
- Build UI app with Next.js
- Automated deployment