Open 3f6a opened 3 months ago
Tell us about your environment (OS, CPU architecture, engine version of Docker etc.)
I am on macOS (latest version, 14.3), Apple Silicon. I'm not sure how to get the "engine version of Docker"? But should also be the latest. I have Docker Desktop, and update frequently.
I'm not sure if it's relevant, but since the file that's failing is https://github.com/JuliaLang/devcontainer-features/blob/main/src/julia/postcreate.jl, I am suspicious of the way it determines whether a project is a package or an app, just by looking at whether Manifest exists or not.
Thanks. Could you provide a reproducible example according to your speculation that it is related to workspace files?
I believe I might know what is going on. I have a private registry where my package has some dependencies. Could it be that this feature is trying to install those packages, and failing because it doesn't have access to the registry nor the private repos?
If so, any suggestion on how I might set this up? I'd need to:
gh
to authenticate to GitHub.I know how to do these things in my own terminal, or in a container that I configure by hand. But the question is how I could do these things before the Julia feature attempts to instantiate the environment.
Does this sound like a reasonable cause of the issue?
I see. I know there have been discussions upstream to make secrets available in such cases, but I don't know if they are actually available now. And, the functionality for adding registries is not currently here, so we will need to add it.
Since I don't know if the secret is available, I think the possible solution now is to add a option to disable the script. PRs are welcome!
Yes, disabling the postCreate.jl
in this tool could be a solution, or allowing us to add our own script. However at that point I'm not sure the feature is that useful, since its setup becomes almost as complicated as just having my own scripts to setup Julia and so on.
But maybe a note in the readme warning users about this limitation (regarding private repos, LocalRegistries, ...) could be helpful.
I have a similar/the same? problem. This github repo contains a minimum non-working example that reproduces the error.
The failure is somehow influenced by the line setting the PATH
environment variable here, after commenting out this section everything works OK.
@ahjulstad I don't think your problem is relevant. Since you don't seem to need Julia to be installed with this Feature, could you simply not install this Feature?
It is the Julia postCreateCommand that fails, forgot to mention. The error message is similar to the original post.
(But yes, you are probably right that it has nothing to do with private registry) .
@ahjulstad IIUC, you are not going to use julia installed by this Feature. So I don't think you should install this Feature.
,"remoteEnv": {
"PATH": "${containerEnv:PATH}:/home/vscode/.julia/conda/3/x86_64/bin"
}
I am using Julia from this feature. Error still happens if changing the above to:
,"remoteEnv": {
"PATH": "${containerEnv:PATH}"
}
which I don't really understand why would do anything. After startup I can run Julia or the postcreate.jl
script just fine, but the language server does not start.
The resulting path if I delete the remoteEnv statement becomes:
/vscode/vscode-server/bin/linux-x64/e170252f762678dec6ca2cc69aba1570769a5d39/bin/remote-cli:/home/vscode/.juliaup/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.local/bin
If I keep the remoteEnv statement
/home/vscode/.juliaup/bin:/vscode/vscode-server/bin/linux-x64/e170252f762678dec6ca2cc69aba1570769a5d39/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.local/bin
Same elements, but slightly different sequence.
(The purpose of the original path setting was to make the Julia-installed python available at the command prompt, with the goal of sharing python environments across devcontainers. And if you ask, why use devcontainers at all; I am on Windows.)
@ahjulstad Anyway, I think your problem is a hijacking of the issue and I suggest you open another issue.
I recently created a feature that has the ability to set a lifecycle script to any lifecycle to test it out and confirmed that it works well. Perhaps the same thing can be done here. rocker-org/devcontainer-features#226
I get the following error during creation of a fresh dev container:
I'm not able to see anything else.
My
devcontainer.json
file is just this: