Using this in AWS Lambda #612
Replies: 3 comments 3 replies
-
I don't know anything about "AWS Lambda". Keep that in mind when you read the rest of this. A wasm version of libktx is available in KTX-Software-4.1.0-rc2-Web-libktx.zip. The wasm module is the full library including encoders. The package also includes a JS wrapper that supports opening of KTX files and uploading of the textures to WebGL. I'd be very happy to accept a PR to expose more of the libktx functionality to JS via the wrapper. |
Beta Was this translation helpful? Give feedback.
-
I never answered your original question. Sorry. My previous answer was based on the assumption you wanted JS code to run in node.js. If creating the texture within the Docker container meets your need then the The 3 Linux packages are all built on Ubuntu Focal - that's the only Linux available in the CI service - and are just different packages of the same build. What OS and OS version is the Docker container running? Have you tried the You could try |
Beta Was this translation helpful? Give feedback.
-
In response to #649. I am sorry you are still having problems @milantimotijevic. I do not have an environment where I can test the rpm package. It is built by cpack from the same package configuration as the .deb and .tar packages so it almost certainly contains the same components. Have you tried
I am confident libktx.so is included in the package. If you try What does the other command do that |
Beta Was this translation helpful? Give feedback.
-
Is there a way to run this inside a NodeJS AWS Lambda? I am able to install the .deb package on my own Ubuntu, but is there some kind of JS library or a file that could be run from within a Lambda?
This is what I tried so far:
Created a docker container using this Dockerfile (this is the setup AWS Lambda uses)
FROM public.ecr.aws/lambda/nodejs:12
RUN mkdir -p "/var/task"
CMD [ "index.handler" ]
sshed into that container
yum install wget
wget https://github.com/KhronosGroup/KTX-Software/releases/download/v4.1.0-rc2/KTX-Software-4.1.0-rc2-Linux-x86_64.rpm
yum install KTX-Software-4.1.0-rc2-Linux-x86_64.rpm
And I ended up with the following error output:
sh-4.2# yum install KTX-Software-4.1.0-rc2-Linux-x86_64.rpm Loaded plugins: ovl Examining KTX-Software-4.1.0-rc2-Linux-x86_64.rpm: ktx-software-4.1.0-1.x86_64 Marking KTX-Software-4.1.0-rc2-Linux-x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package ktx-software.x86_64 0:4.1.0-1 will be installed --> Processing Dependency: libm.so.6(GLIBC_2.27)(64bit) for package: ktx-software-4.1.0-1.x86_64 amzn2-core | 3.7 kB 00:00:00 --> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.26)(64bit) for package: ktx-software-4.1.0-1.x86_64 --> Processing Dependency: libktx.so.4()(64bit) for package: ktx-software-4.1.0-1.x86_64 --> Finished Dependency Resolution Error: Package: ktx-software-4.1.0-1.x86_64 (/KTX-Software-4.1.0-rc2-Linux-x86_64) Requires: libm.so.6(GLIBC_2.27)(64bit) Error: Package: ktx-software-4.1.0-1.x86_64 (/KTX-Software-4.1.0-rc2-Linux-x86_64) Requires: libstdc++.so.6(GLIBCXX_3.4.26)(64bit) Error: Package: ktx-software-4.1.0-1.x86_64 (/KTX-Software-4.1.0-rc2-Linux-x86_64) Requires: libktx.so.4()(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
Is there something wrong with the .rpm binary, or am I doing something wrong? I can easily install the .deb binary on Ubuntu, but unfortunately that's not the distribution I need it on
Beta Was this translation helpful? Give feedback.
All reactions