News for hackers. Stuff that matters.
Re:Apple Unveils MacBook Pro Featuring M2 Pro and M2 Max by hk1337 on Tuesday January 17, 2023 @09:31AM (#34412773)
How is development setup on the M2? Specifically Docker and Python. Docker VM has always seemed rather meh on my M1 and installing different python versions with pyenv either goes well or has _a lot_ of workarounds.
Re:Apple Unveils MacBook Pro Featuring M2 Pro and M2 Max by dugab on Tuesday January 17, 2023 @09:38AM (#34412846)
I have no issues working with Docker/Python on a M1 Macbooks. Docker Desktop/Colima does the job well, and most of the images I use are available on arm. Running amd64 images is slower, but works well.

For Python, Python itself is rarely the problem, but more often some older libraries that don't have wheels for M1 Mac, or incompatibilities. Upgrading your dependencies, if it's an option, is often enough.

Asdf + PDM are also nice tools to work with multiple projects/Py versions easily.

Re:Apple Unveils MacBook Pro Featuring M2 Pro and M2 Max by hk1337 on Tuesday January 17, 2023 @09:51AM (#34413028)
> Asdf + PDM are also nice tools to work with multiple projects/Py versions easily.

I haven't heard of either of these but they seem interesting. I'll look into them. Thanks.

Re:Apple Unveils MacBook Pro Featuring M2 Pro and M2 Max by smoldesu on Tuesday January 17, 2023 @09:36AM (#34412825)
That's OS-specific, and doesn't really have much to do with the chip. Managing Python will be frustrating on every OS, but running Docker software will always be uniquely slow on MacOS. If you want native Docker performance, you need a kernel with native Linux support.
Re:Apple Unveils MacBook Pro Featuring M2 Pro and M2 Max by hk1337 on Tuesday January 17, 2023 @09:37AM (#34412836)
Fair point.
Re:Apple Unveils MacBook Pro Featuring M2 Pro and M2 Max by KAdot on Tuesday January 17, 2023 @10:09AM (#34413293)
macOS 13 Ventura introduced[1] support of running amd64 binaries with Rosetta inside of arm64 Linux VMs when using Apple Virtualization framework.

Latest Docker Desktop and Lima VM can take advantage on the new feature. It makes running amd64 containers significantly faster.

Here is a very short manual how to setup Docker with Lima VM and Rosetta https://gist.github.com/akrylysov/7c1ea3bac409da2758e525f2f8...

[1]: https://developer.apple.com/documentation/virtualization/run...

Re:Apple Unveils MacBook Pro Featuring M2 Pro and M2 Max by tpmx on Tuesday January 17, 2023 @11:14AM (#34414317)
Docker Desktop on Intel Mac (the "supported" config) is not super stable as is. I'm going to wait for official Docker support until upgrading to an M2 (or M3?) Mac.

Seriously thinking about getting a fast AMD Linux box to run Docker workloads network-locally, I'm working from home 99.9% of the time anyway.

Re:Apple Unveils MacBook Pro Featuring M2 Pro and M2 Max by gizmo on Tuesday January 17, 2023 @10:42AM (#34413812)
x64 virtual machines on M2 are almost unusably bad for me. Everything else is (near) perfect. Apparently it's somewhat better on Ventura, but I don't want to take the risk of upgrading.
Re:Apple Unveils MacBook Pro Featuring M2 Pro and M2 Max by coding123 on Tuesday January 17, 2023 @01:30PM (#34416536)
I was a holdout for a while, but try Podman. I finally upgraded my Intel Mac and it went pretty smoothly. The only thing I recommend to people is ignore the "alias docker=podman" crap you see everywhere. The only true way to make things work well is make a docker symlink (on your path somewhere) to podman. If you do the alias thing you'll quickly discover bash scripts "can't find docker" and you'll end up doing a lot of chopt crap that doesn't work.

That all being said I don't have an M1 (or an M2 for that matter) so I don't know if Podman works "well" on it.

Re:Apple Unveils MacBook Pro Featuring M2 Pro and M2 Max by kdrag0n on Tuesday January 17, 2023 @02:33PM (#34417486)
Shameless plug on this topic: I've been working on a new Linux+Docker+Kubernetes solution for macOS recently! Already has quite a few improvements over existing apps including Docker Desktop, Rancher, Colima, etc: fast networking (30 Gbps), VirtioFS and bidirectional filesystem sharing, Rosetta for fast x86, full Linux (not only Docker), lower CPU usage, and other tweaks.

More details here to avoid spamming this thread: https://news.ycombinator.com/item?id=34374176