jan icon indicating copy to clipboard operation
jan copied to clipboard

feat: Integrate Devbox shell for virtualized local development

Open myrtleTree33 opened this issue 1 year ago • 1 comments

Use Devbox shell for isolating dependency installs

Hi, I would like to introduce Devbox Shell to make it easier to contribute to Jan AI code. Devbox shell offers a local virtualized environment (similar to Pyenv) that allows me to install dependencies such as Node, without corrupting my PATH and Node versions.

Why not use ASDF

Allows for future proofing, if we need to virtualise other dependencies such as Python in future

Why not use VSCode Dev Containers

We evaluated this in my company previously, found it was not as performant and half-baked in terms of features, documentation and support, compared to Devbox Shell / Nix

Benefit to the community

I can just run devbox shell to get the requirements set up. In future someone can add scripts to preconfig the environment where needed, without messing up the environment. (The make clean is rather lengthy and could be improved IMO).

Installation

  • Clone the Jan repository

  • Run devbox shell to install X version of Node + Yarn

  • Run make dev or equivalent

Fixes Issues

Self Checklist

  • [X] Added relevant comments, esp in complex areas
  • [X] Updated docs (for bug fixes / features)
  • [X] Created issues for follow-up changes or refactoring needed

myrtleTree33 avatar Jun 30 '24 14:06 myrtleTree33

Hi @myrtleTree33, thank you for your contribution. Could you please help rebase the latest code changes so we can proceed?

louis-jan avatar Aug 11 '24 15:08 louis-jan

@myrtleTree33 We appreciate this PR, however after reviewing it I'm going to close it as stale/not planning to do for now:

  • We looked at DevShell, but internally we would prefer to continue with our current vanilla Docker setup
  • We can consider it in the future

Thanks for contributing, and you're welcome to maintain a long-term fork with these changes - wanted to leave you a note to explain our rationale

dan-menlo avatar Sep 09 '24 07:09 dan-menlo