-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create VSCode Development Environment #900
base: main
Are you sure you want to change the base?
Create VSCode Development Environment #900
Conversation
Reviewer's Guide by SourceryThis pull request introduces a VS Code development container for the project. It includes a No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
More then happy to close this pull request if deemed irrelevant. |
a9a6c02
to
f12a639
Compare
@cgruver were you looking into something similar? PTAL |
.vscode/extensions.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One caveat on the extensions. Only users of Microsoft provided VSCode can use extensions from the Microsoft marketplace. Users of open-source builds of VSCode like VSCodium or Eclipse Che will technically be in violation of the MS Terms of Use if they pull extensions from the Marketplace. Open Source VSCode users will need to use Open-VSX.org which is hosted by the Eclipse foundation.
I know that most of these extensions exist there too, but I'm not sure all of them do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked Open-VSX.org, Seems like all the extensions exist but the ms-vscode-remote.remote-containers
Kind of similar. I am using an OpenShift Dev Spaces workspace for my development. However, it is using some Tech Preview features on OpenShift 4.18, so it's not generally useable by most. Once OCP ~4.19+ goes GA with kernel level user namespace support, I will probably create a PR to share my workspace. For the curious, my workspace is here - https://github.com/cgruver/llama-cpp-intel-gpu-workspace |
.devcontainer/devcontainer.json
Outdated
"--security-opt=unmask=ALL", | ||
"--device=/dev/fuse", | ||
"--systemd=false", | ||
"--device=/dev/dri", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this fail if any of the referenced devices do not exist on a platform?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... Generally --device fails if the device doesn't actually exist, sometimes I wish we had a --device-if-exists option in podman
Thanks for all your reviews @ericcurtin @cgruver @rhatdan, I really appreciate it. I'll migrate those changes tonight. Also happy to close this PR if OCP is a better approach in the long run. ❤️ |
Oh no, don't close the PR. This is a good addition. The OCP approach is an Cheers. |
Going to put some more thought into |
Signed-off-by: GeoDerp <[email protected]>
Signed-off-by: GeoDerp <[email protected]>
Signed-off-by: GeoDerp <[email protected]>
Signed-off-by: GeoDerp <[email protected]>
00fd87d
to
0fddd80
Compare
Since I use emacs, I have no ability to review this. but I am fine with this going in. |
vim for life! I might change someday 😄 |
Ok we will rely on @GeoDerp being correct and wait for him to remove draft status and merge. then others who use vscode can make changes if necessary. |
@n1hility Not sure if this is something you have experience with? |
I'll wait until the weekend to do a thorough test, and think about some solutions for those two problems. 😁❤️ I'm currently thinking about adding open-ssh server to the devcontainer. Scripting an action to SSH in, if dev container extension doesn't exist (VSCodium / Eclipse). Haven't got around to thinking about the, --device issue yet. |
Signed-off-by: GeoDerp <[email protected]>
Still a work in progress. (not 100% sure that this PR adds enough to the project to merge). This Bash script builds and runs a container acting like a development environment. Then ssh's into the container via a installed IDE (VScode,VSCodium, Thiea) The logs are still returning I also haven't tested VSCodium and Theia in-depth. Posting commit in hopes of feedback and advice. |
My thoughts are that the dev container environment is probably pretty useless, due to the project itself. (only requirements for the host is podman and python) I am more than happy to rm the |
VSCode Dev Container - Development Environment
WIP, all commentary appreciated.
VS Code additions
control
+shift
+p
->Tasks: Run task
->Project Install
Run & Debug
->Run Benchmark
ollama://llama3.2:1b
Extensions automatically installed in Dev Container:
Dev Container
Summary by Sourcery
Introduce a VSCode development environment with a devcontainer. This environment includes pre-installed extensions, configurations, and tasks for building, installing, and benchmarking the project. It also configures podman to run inside the container.
Build: