Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to Julia 1.8 #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Updated to Julia 1.8 #4

wants to merge 1 commit into from

Conversation

Benvorth
Copy link

+fixed "access denied" on bootstrap-file during lambda init on AWS side

+fixed "access denied" on bootstrap-file during lambda init on AWS side
@Scusemua
Copy link

Scusemua commented Jan 2, 2023

I've tried building the Docker image/container using the provided file, but I encountered an error:

Step 8/14 : RUN /usr/local/julia/bin/julia --project=. -e "using Pkg; Pkg.instantiate(); Pkg.precompile()"
 ---> Running in 9034edzy412f
ERROR: fatal: error thrown and no exception handler available.
ErrorException("`ccall` requires the compiler")
copy at array.jl:369
IdDict at iddict.jl:45
copy at iddict.jl:153
#show_full_backtrace#882 at errorshow.jl:580
show_full_backtrace##kw at errorshow.jl:576
show_backtrace at errorshow.jl:781
#showerror#861 at errorshow.jl:90
showerror##kw at errorshow.jl:86
show_exception_stack at errorshow.jl:878
display_error at client.jl:103

Did you encounter anything like this?

EDIT: Following the discussion and recommendations here, I changed line 22 from
RUN /usr/local/julia/bin/julia --project=. -e "using Pkg; Pkg.instantiate(); Pkg.precompile()"
to
RUN LD_LIBRARY_PATH="" /usr/local/julia/bin/julia --project=. -e "using Pkg; Pkg.instantiate(); Pkg.precompile()"
and the error no longer occurs.

I also needed to prepend RUN LD_LIBRARY_PATH="" to the last line of the bootstrap file so that it looks like:
LD_LIBRARY_PATH="" /usr/local/julia/bin/julia --project=. main.jl

@Scusemua
Copy link

Scusemua commented Jan 2, 2023

Right, so I can test everything locally by running the image via:
docker build -t julia-lambda:latest . && docker run -it --rm -p 9000:8080 julia-lambda:latest
And posting requests via:
curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '10000'

This works fine. But when I try to use the same image on AWS Lambda, I get this error:

ERROR: could not load library "/usr/local/julia-1.8.2/lib/julia/sys.so"
/usr/local/julia-1.8.2/lib/julia/sys.so: failed to map segment from shared object

Any ideas?

@tk3369
Copy link
Owner

tk3369 commented Jan 3, 2023

I couldn't reproduce this problem. I did mostly what you did but with Julia 1.8.4 and a slightly different chmod command (which shouldn't matter). Can you try the branch from PR #5?

@Scusemua
Copy link

Scusemua commented Jan 3, 2023

Sure, I'll give that a try. To be clear, you're still able to deploy this repo to AWS Lambda itself? I was also just wondering if AWS Lambda has changed something about how the custom containers are supposed to be setup (and that would be the cause for the failed to map segment from shared object error).

@tk3369
Copy link
Owner

tk3369 commented Jan 4, 2023

Right. I have no problem deploying to AWS Lambda and running a test there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants