Skip to content

Error with package compiler and docker #17

Open
@AbrJA

Description

Hi @ScottPJones , I hope you are doing well

There is an issue with this package when you create an app using PackageCompiler and put it in a docker. I think it is because the html.dat file is not copied into the bundle of files. Maybe using DataDeps could help to solve it

This is the error I got:

InitError(mod=:HTML_Entities, error=Base.SystemError(prefix="opening file "/home/ajaimes/.julia/packages/HTML_Entities/0GIgo/src/../data/html.dat"", errnum=2, extrainfo=nothing))

This is my Dockerfile:

FROM debian:bullseye-slim

COPY binaries ./binaries

ENTRYPOINT ["binaries/bin/Test",  "--julia-args", "--threads=2"]

And this is the App:

module Test

using TextAnalysis

function julia_main()::Cint
    try
        stemmer = Stemmer("spanish")
        text = "Bienvenidos gerentes y analistas"
        stem(stemmer, split(text)) |> println
    catch
        Base.invokelatest(Base.display_error, Base.catch_stack())
        return 1
    end
    return 0
end

end # module Test

When I run binaries/bin/Test in my computer it works but when I put the binaries into a docker container it fails, I think it is important to solve because WordTokenizers depends on it and TextAnalysis also does.

Thank you for your help, any question please let me know

Abraham JA

Note:

  1. This is the whole message
fatal: error thrown and no exception handler available.
InitError(mod=:HTML_Entities, error=Base.SystemError(prefix="opening file "/home/ajaimes/.julia/packages/HTML_Entities/0GIgo/src/../data/html.dat"", errnum=2, extrainfo=nothing))
#systemerror#89 at ./error.jl:176
systemerror at ./error.jl:176
systemerror at ./error.jl:176
#systemerror#88 at ./error.jl:175 [inlined]
systemerror at ./error.jl:175 [inlined]
#open#729 at ./iostream.jl:293
open at ./iostream.jl:275 [inlined]
#open#424 at ./io.jl:394
open at ./io.jl:393 [inlined]
load at /home/ajaimes/.julia/packages/StrTables/RV7P3/src/StrTables.jl:362 [inlined]
__init__ at /home/ajaimes/.julia/packages/HTML_Entities/0GIgo/src/HTML_Entities.jl:32
jfptr___init___69116 at /binaries/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/builder-amdci4-0/julialang/julia-release-1-dot-10/src/gf.c:2895 [inlined]
ijl_apply_generic at /cache/build/builder-amdci4-0/julialang/julia-release-1-dot-10/src/gf.c:3077
jl_apply at /cache/build/builder-amdci4-0/julialang/julia-release-1-dot-10/src/julia.h:1982 [inlined]
jl_module_run_initializer at /cache/build/builder-amdci4-0/julialang/julia-release-1-dot-10/src/toplevel.c:76
_finish_julia_init at /cache/build/builder-amdci4-0/julialang/julia-release-1-dot-10/src/init.c:901
julia_init at /cache/build/builder-amdci4-0/julialang/julia-release-1-dot-10/src/init.c:844
ijl_init_with_image at /cache/build/builder-amdci4-0/julialang/julia-release-1-dot-10/src/jlapi.c:70 [inlined]
ijl_init_with_image at /cache/build/builder-amdci4-0/julialang/julia-release-1-dot-10/src/jlapi.c:59
ijl_init at /cache/build/builder-amdci4-0/julialang/julia-release-1-dot-10/src/jlapi.c:86
main at binaries/bin/Test (unknown line)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at binaries/bin/Test (unknown line)
  1. I have seen this error on Julia 1.9 and 1.10

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions