Code Monkey home page Code Monkey logo

devcontainer-features's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

devcontainer-features's Issues

Install the postcreate script in the julia Feature

I believe that the postcreate.jl script referenced from the current Dev Container Template can be installed with the julia Feature.

https://github.com/microsoft/vscode-dev-containers/blob/8918c936dfaf3b03b923ce63c524adf52d32e492/containers/julia/.devcontainer/devcontainer.json#L17
https://github.com/julia-vscode/julia-devcontainer/blob/60c2852703d5f4e2fc419198a95c49be37d12ccb/postcreate.jl

That would be helpful when creating a new Dev Container Template using the julia Feature.

It may be a good idea to change the installation path, see also how the common-utils Feature copies scripts into the container.

https://github.com/devcontainers/features/blob/a9a7a25d60585ce2145374ec6825cbdc7f16cb90/src/common-utils/main.sh#L487

Pre-compiling LanguageServer in postcreate.jl

Would it make sense to e.g. pre-compile some packages in postcreate.jl to make the language server etc. start faster? (once postcreate.jl is done)

I.e.

  1. LanguageServer et al., i.e. the language server env., e.g., @ ~/.vscode-server/extensions/julialang.language-julia-1.60.2/scripts/environments/languageserver/v1.9.
  2. VSCodeServer

Add to the collections index

https://containers.dev/collections

The julia Feature seems to be working well, so it would be good to add this repository to the index.
Once registered in the index, it will appear in the VS Code and Codespaces UI.

Note: There is currently no document URL set for Julia Feature, consider merging #7 and publishing a new version.

Error during creation

I get the following error during creation of a fresh dev container:

Running the postCreateCommand from Feature 'ghcr.io/julialang/devcontainer-features/julia:1'...

[11384 ms] Start: Run in container: /bin/sh -c /usr/local/julia-devcontainer-features/postcreate.jl
[20730 ms] postCreateCommand failed with exit code 1. Skipping any further user-provided commands.

I'm not able to see anything else.

My devcontainer.json file is just this:

{
	"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
	"features": {
		"ghcr.io/julialang/devcontainer-features/julia:1": {},
	}
}

postCreate script failing with trivial path environment variable changes to devcontainer.json

When specifying PATH environment variable in the devcontainer.json, for example like this:

"remoteEnv": {
	 	"PATH": "${containerEnv:PATH}"
	}

the postcreate.jl script fails.

Running the postCreateCommand from Feature 'ghcr.io/julialang/devcontainer-features/julia:1'...

[19325 ms] Start: Run in container: /bin/sh -c /usr/local/julia-devcontainer-features/postcreate.jl
[20064 ms] postCreateCommand failed with exit code 127. Skipping any further user-provided commands.
Done. Press any key to close the terminal.

MWE here:

ahjulstad/julia-devcontainer-feature-errror-minimimworkingexample@df76810

julia> versioninfo()
Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 12 ร— Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 12 virtual cores)

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.)

Perhaps this is caused by some core devcontainer feature, I don't know...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.