# Julia in docker could not find packages in \`$JULIA\_LOAD\_PATH\`

**URL:** https://discourse.julialang.org/t/julia-in-docker-could-not-find-packages-in-julia-load-path/134865
**Category:** General Usage
**Tags:** package
**Created:** [January 4, 2026, 4:20am UTC](https://discourse.julialang.org/t/julia-in-docker-could-not-find-packages-in-julia-load-path/134865 "2026-01-04T04:20:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Chrysoberyl](https://avatars.discourse-cdn.com/v4/letter/c/ed655f/32.png) [@Chrysoberyl](https://discourse.julialang.org/u/Chrysoberyl)
#### Post date: [January 4, 2026, 4:20am UTC](https://discourse.julialang.org/t/julia-in-docker-could-not-find-packages-in-julia-load-path/134865/1 "2026-01-04T04:20:50Z")

</div>

I’m using Julia inside a docker container. I set `$JULIA_LOAD_PATH` to `$load_path:`, where `$load_path` contains

```julia-auto
$ ls $load_path
...
Compat
...
NNlib
...
$ cat $load_path/Compat/Project.toml
...

[extensions]
CompatLinearAlgebraExt = "LinearAlgebra"
$ ls $load_path/Compat/ext/
CompatLinearAlgebraExt.jl

```

However, I could not load `NNlib.jl`:

```julia-auto
$ julia -e "using NNlib"
Info Given NNlib was explicitly requested, output will be shown live
ERROR: LoadError: ArgumentError: Package CompatLinearAlgebraExt [dbe5ba0b-aecc-598a-a867-79051b540f49] is required but does not seem to be installed:
 - Run `Pkg.instantiate()` to install all recorded dependencies.

```

Why can’t Julia find `CompatLinearAlgebraExt`?

Moreover, I set `$JULIA_DEPOT_PATH` to `.julia:precompiled-depot`, where `precompiled-depot/compiled` contains precompiled files (but compiled outside of docker), but Julia seems to completely ignore them.

```julia-auto
$ ls precompiled-depot
artifacts compiled

```

Upon further inspection, the filenames inside `compiled` is different. It seems like precompiling inside and outside of the docker image makes a difference. The `Sys.CPU_NAME` variable inside and outside of the image show `znver1`.

```julia-auto
bash-5.3# ls .julia/compiled/v1.12/HTTP
zXWya_7qVsF.ji	zXWya_7qVsF.so
bash-5.3# ls precompiled-depot/compiled/v1.12/HTTP
zXWya_mJgfz.ji	zXWya_mJgfz.so

```

---

<div class="post-metadata">

### Author: ![greatpet](https://avatars.discourse-cdn.com/v4/letter/g/e495f1/32.png) [@greatpet](https://discourse.julialang.org/u/greatpet)
#### Post date: [January 4, 2026, 9:58am UTC](https://discourse.julialang.org/t/julia-in-docker-could-not-find-packages-in-julia-load-path/134865/2 "2026-01-04T09:58:31Z")

</div>

Could you provide a complete MWE, including the Dockerfile, the command you used to launch the container, and the command you used to set the environment variables?

---

<div class="post-metadata">

### Author: ![greatpet](https://avatars.discourse-cdn.com/v4/letter/g/e495f1/32.png) [@greatpet](https://discourse.julialang.org/u/greatpet)
#### Post date: [January 4, 2026, 10:29am UTC](https://discourse.julialang.org/t/julia-in-docker-could-not-find-packages-in-julia-load-path/134865/3 "2026-01-04T10:29:24Z")

</div>

> [@Chrysoberyl](#):
>
> It seems like precompiling inside and outside of the docker image makes a difference.

I always precompile inside the image, as a build step in Dockerfile, after setting the environment variable JULIA\_CPU\_TARGET to one that works for generic machines.
