Pkg: Using ENV paths

Hello all, this is related to my other post in which I’m trying desperately to get together an automated deployment of a dockerized program that pulls from a private git repo. I have pretty much given up on trying to clone from the repo in an automated way; it’s just being extremely uncooperative (probably mostly the fault of the repo).

The next best option would be simply to copy all of the packages from that repo into a docker image and be done with it. Thing is, when I use local packages, it seems to depend on the absolute path of the package. This is a problem, because once I put it into a docker that path changes. Is there currently any way to get Pkg to know that the path should be relative to an environment variable rather than using the full path? I realize that I could create a build script that adds them relative to the environment variables, but that seems drastically more complicated than just doing Pkg.instantiate(), so I’d really prefer to get it in there directly. I suppose I can always edit the manifest manually, but that would require me to maintain two copies of it which is a bit unpleasant as well.

If you are using Pkg.develop the paths should be stored relative the Project.toml file, see Maybe that is helpful for this situation?

1 Like

Yup I think that’s pretty much the best I can do for now.

I wonder if it would be worth opening a Pkg issue to make using ENV paths a feature?

I am not exactly sure I understand your setup, but can’t you just set DEPOT_PATH?

I guess I’m a bit confiused about what the behavior is once explicit paths are set in the Manifest.toml. I don’t really want to set the entire DEPOT_PATH since I already have a perfectly good depot containing the majority of the packages that I need, but I suppose I can add to the LOAD_PATH.