top | item 40865110

(no title)

Yanael | 1 year ago

I started to develop in containers before VSCode introduced the dev container to keep my local machine clean. A few years ago, I switched to the VSCode dev container, and the integration is very good. Having the ability to have a dev environment ready per project is very neat. We started to adopt it in my company. As a team it saves a lot of hassle, and onboarding is much faster. However, we have encountered some issues, mainly when we want to work with GPU and PyTorch dependencies, and that is the opposite of pleasant! Otherwise, now each new project/repo I create comes with a dev container.

discuss

order

ikety|1 year ago

Recently went from using devcontainers to nix-shell. But in every new project I include instructions for both nix-shell + direnv as well as dev containers, so people can fully ignore nix if they choose.

A form of this which mixes devcontainer and nix might be the holy grail

https://www.youtube.com/watch?v=kpBXrsVg83Y&t=941s

Positives

- You lean on the power of dev containers while still using a portable spec

- You get access to nixpkgs which is arguably the most exhaustive package library

- You get the "true reproducibility" of nix over docker

Negatives

- Docker remains the king for ephemeral databases, more convoluted to manage with nix

ossusermivami|1 year ago

I use devenv.sh and generate oci containers out of it, which give me kinda the best of both worlds!

(nobody in my team use vscode or devcontainers but enjoy using docker)

Yanael|1 year ago

Nix sounds like a great fit as well, but my experience with it has not been that great, and I feel it is not ideal for Python. I recently gave Flox a try, which simplifies the use of Nix. I use it from time to time, but it has not yet replaced my development environment.

In your case, is maintaining 2 dev env not annoying?

ronef|1 year ago

We were building something very similar to this in collaboration with the VSCode teams a while back at Meta. The goal was to get development on demand via hooking into some beefy linux server farm shile having VSCode stay as the local experience. Though one of the problems even back then was similar to what you are mentioning. It did however remove all last mile network reliance during lockdown which was a plus.

synergy20|1 year ago

same here, from dev container to just docker here, works well