Back

Appwrite Function Failing to Install Requirements

  • 0
  • Flutter
  • Functions
ZachHandley
7 Jul, 2023, 06:04

so

TL;DR
The user is experiencing an issue with installing requirements for an Appwrite function. They inquire about the next release and express curiosity about the timeline. The support team mentions a different approach of providing a runtime with pre-installed libraries. They provide a solution involving updating the Dockerfile to include necessary dependencies. The user suggests adding a value in the `appwrite.json` file to specify required libraries for compilation. The issue appears to stem from the base Docker image lacking functionality.
ZachHandley
7 Jul, 2023, 06:04

is it just the docker missing the functionality?

ZachHandley
7 Jul, 2023, 06:04

Cause couldn't we just add an extra value to the appwrite.json that specifies if we need certain libraries required to compile them and then use a different docker image? I'm not sure on the specifics

Drake
7 Jul, 2023, 06:07

the base docker image doesn't have gcc to compile the dependencies

ZachHandley
7 Jul, 2023, 06:21

what's the docker image based on? I'm sure you guys checked already but

ZachHandley
7 Jul, 2023, 06:31

in the referenced github there's someone that said

TypeScript
@malachibazar The fix has been accepted so it'll probably come out with the next merge.
If you need the fix with any speed just add RUN apk --no-cache add musl-dev linux-headers g++ to the python docker files right under the FROM line
ZachHandley
7 Jul, 2023, 06:31

I know you saw that because you referenced it but will that not work?

ZachHandley
7 Jul, 2023, 06:42

yeah so all that's needed is to add

TypeScript
RUN apk update && apk add python3-dev \
                          gcc \
                          libc-dev \
                          libffi-dev
TypeScript
FROM python:3.10-alpine3.15

LABEL maintainer="team@appwrite.io"

ENV INTERNAL_RUNTIME_ENTRYPOINT=main.py

RUN mkdir -p /usr/local/src/
RUN mkdir -p /usr/code
RUN mkdir -p /usr/workspace
RUN mkdir -p /usr/builds

WORKDIR /usr/local/src

COPY . .
RUN apk update && apk add python3-dev \
                          gcc \
                          libc-dev \
                          libffi-dev
RUN chmod +x /usr/local/src/start.sh
RUN chmod +x /usr/local/src/build.sh

ENV FLASK_APP="/usr/local/src/server.py"

EXPOSE 3000

CMD ["/usr/local/src/start.sh"]
ZachHandley
7 Jul, 2023, 06:42

I just ran it and it worked just fine

ZachHandley
7 Jul, 2023, 06:46

well if that works I can add the change, if not let me know

ZachHandley
7 Jul, 2023, 06:46

I saw the concern about size and I really wouldn't be too concerned

Drake
7 Jul, 2023, 06:51

No, you don't need to submit a PR

ZachHandley
7 Jul, 2023, 07:01

So will it be added or is the size preventing it?

Drake
7 Jul, 2023, 08:12

We're taking a different approach. We plan to provide a runtime with various ML libraries already installed including pandas

ZachHandley
7 Jul, 2023, 08:18

Ahh okay. Is there any sort of timeline or anything I can do to help?

Drake
7 Jul, 2023, 14:04

I think it's going to be in the next release so just be patient

ZachHandley
8 Jul, 2023, 06:50

Just out of curiosity how often are releases normally? I’m working on a demo app to get paid and just curious if I should host a server temporarily and run the API locally for now and then switch it over or what you’d recommend

Drake
8 Jul, 2023, 15:09

Don't wait for the release

ZachHandley
22 Jul, 2023, 19:01

Hey just curious, I know the new release came out, but it's not included in it?

Drake
22 Jul, 2023, 19:43

Not 1.3.8

ZachHandley
22 Jul, 2023, 19:46

Any update?

Drake
22 Jul, 2023, 19:49

When I said next release, I meant 1.4. No update but its coming

ZachHandley
22 Jul, 2023, 22:53

Ah I understand

ZachHandley
22 Jul, 2023, 22:53

thank you!

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more