Where exactly is the runtime located for the functions? Are they scoped in a container or how does this work? I want to write a python function that uses external libraries, which are pretty big, so i want to understand where I would install them? Same goes for js functions, I'm curious on how this works, if anyone could explain, would be awesome. #python #js <#812714347298160690>
Supported runtimes : https://appwrite.io/docs/functions#supportedRuntimes
Thank you @Bouahaza, its nice to see that many run-times are supported, but that doesn't really answer my question. Lets say i would want to run playwright but i need to install browsers there as well. How would I do that? requirements.txt could solve the first part, of installing the pip package. What about installing the actual browsers? here's sample install code on ubuntu. py
pip install pytest-playwright
playwright install-deps
playwright install
Hope that makes sense.
I use functions in python in my project. I just need to put the packeage in the requirements.txt file, appwrite is in charge of downloading the dependencies. One limitation I found, it is not possible to use pandas: https://github.com/appwrite/appwrite/issues/1037
@rafagazani your github issue is a great example, of the problem I'm facing. Slight change is that i need playwright commands to be executed as well, not only install requirements.txt.
I don't understand you, could you give an example of what you want to do?
playwright looks like it's for testing. Are you trying to write tests?
It's for browser automation and can be used for scraping sites, that protect against scrapers, via js value updates. So no.
i see...ya, you're sort of blocked by the issue linked above (make sure to 👍🏼 it!). I've definitely seen people run into problems where they need some chromium headless browser, but there's no way to install it because it's an OS level dependency. You could try some workaround/hack like including a binary in the uploaded code or something.
Launch playwright as docker container ?
Do I understand this right, your suggestion is to make a proxy api ?
Client -> Appwrite function -> Docker container api
Client <- Appwrite function <- Docker container api
Should add a bit letancy and overhead, but is doable i guess..
Better way should be to create a custom build for open runtimes wich is compatible with playwright
We use nodejs18 as appwrite function like that
@Bouahaza could you elaborate on how you run open runtimes with appwrite?
I asked the people who manage this part for information, I will update here
Id be happy to get an update on this aswell
i believe you can execute them directly with os.system("command")
Here all need : https://github.com/appwrite/runtimes/blob/main/CONTRIBUTING.md
<:appwriteupvote:899677724615016528>
Recommended threads
- HTTP POST to function returning "No Appw...
Hi everyone, I’m running into an issue with my self-hosted Appwrite instance. I’ve set up my environment variables (APPWRITE_FUNCTION_PROJECT_ID, APPWRITE_FUNC...
- Can't add dart 3.5 runtime
Modified the `.env` to enable dart 3.5 runtime on my self-hosted instance but still can't find the runtime when creating a new function. I manually pulled the i...
- How to verify an user using AppWrite Fun...
I have seen similar questions but none whose solutions serve me. I have a function to verify a user with their secret and their id: https://blahblah.appwrite.gl...