<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tobias Lang on Medium]]></title>
        <description><![CDATA[Stories by Tobias Lang on Medium]]></description>
        <link>https://medium.com/@tobias_84452?source=rss-6647cefee67d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4VdlbotwlnGjHumV.</url>
            <title>Stories by Tobias Lang on Medium</title>
            <link>https://medium.com/@tobias_84452?source=rss-6647cefee67d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 00:10:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tobias_84452/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[From 2D to 3D: SAM 3D on NVIDIA DGX Spark]]></title>
            <link>https://medium.com/@tobias_84452/from-2d-to-3d-sam-3d-on-nvidia-dgx-spark-0afbc0465ee2?source=rss-6647cefee67d------2</link>
            <guid isPermaLink="false">https://medium.com/p/0afbc0465ee2</guid>
            <category><![CDATA[nvidia-spark]]></category>
            <category><![CDATA[aarch64]]></category>
            <category><![CDATA[3d-modeling]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Tobias Lang]]></dc:creator>
            <pubDate>Sun, 01 Feb 2026 23:01:37 GMT</pubDate>
            <atom:updated>2026-02-01T23:01:37.874Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to run SAM 3D on aarch64 when pre-built wheels don’t exist</h4><p>Meta’s <a href="https://ai.meta.com/research/sam3d/">SAM 3D</a> is a exciting new way to extract clean textured 3D models from a single image. But it requires a NVIDIA GPU with more than 32 GB of video memory to run, typically only available on expensive cloud providers.</p><p>Things changed with the new <a href="https://www.nvidia.com/en-us/products/workstations/dgx-spark/">NVIDIA DGX Spark,</a> which comes with 128GB of memory. It bridges the gap between high-end gaming graphics cards and very expensive datacenter GPU’s such as the H100.</p><p>The Spark might have all the hardware specs we need, but comes with a caveat. <a href="https://www.nvidia.com/en-us/data-center/grace-cpu/">NVIDIA’s Grace CPUs</a> are based on <a href="https://en.wikipedia.org/wiki/AArch64">AARCH64<em> </em>(aka ARM64)</a></p><h4>TL;DR</h4><ul><li>Clone my fork at <a href="https://github.com/tlangmo/sam-3d-objects-spark">https://github.com/tlangmo/sam-3d-objects-spark</a></li><li>Open VS Code and the included DevContainer</li><li>Use the Jupyter Notebook to generate meshes 🎉</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*7QiyTczJTPMiPz7oG5Xiaw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*dhyG6m91E-QD6j5CwZYehA.png" /></figure><h4><strong>About Python Binary packages (wheels)</strong></h4><p>We all got used to the niceties of modern open source software development. Even complex ML projects seemingly can get off the ground quickly</p><p>Take this example, using the Huggingface transformers library.</p><pre>from transformers import pipeline<br><br>classifier = pipeline(<br>    &quot;zero-shot-image-classification&quot;,<br>    model=&quot;openai/clip-vit-base-patch32&quot;<br>)<br><br>classifier(<br>    &quot;https://images.unsplash.com/photo-1546182990-dffeafbe841d&quot;,<br>    candidate_labels=[&quot;dog&quot;, &quot;cat&quot;, &quot;car&quot;]<br>)</pre><p>A few lines of code to perform state-of-the-art computer vision! However, when looking at the <a href="https://github.com/huggingface/transformers">transformers repository</a>, you can see that this is not some magic, but sophisticated software engineering.</p><p>While pure Python code by itself is truly portable and easy to run, things look very different for ML projects. Numpy, torch, scikit — all are written in compiled languages such as C++, for speed and compatibility.</p><p>Native compilation needs a myriad of software dependencies and compiler flags adapted to the target machine. <a href="https://www.linuxfoundation.org/blog/open-source-maintainers-what-they-need-and-how-to-support-them">Open source software maintainers</a> try their best supply the community with pre-compiled “binaries” for various platforms like Win64, MacOS and Linux. <br><a href="https://conda-forge.org/packages/">Conda-Forge </a>is a popular source of those downloads.</p><p>But with limited time and resources, maintainers need to pick which platforms to support — a new and more exotic one like the Spark is likely missing out.</p><h3>A first look at SAM 3D</h3><p>The official setup suggest the use of mamba/conda to create a virtual environment. A quick look at setup.md and other files reveals that this avenue is a no-go on the Spark. They mention <em>Cuda 12.x</em>, and <em>linux-64.</em></p><p>We<em> </em>need <strong>Cuda 13.x </strong>and<strong> linux-aarch64.</strong></p><p>At this point, we should take a step back and first create a safe and reproducible development environment. If we start to apt install or pip install our way out, we will soon have a host system which is filled with corrupt or incompatible system libraries.</p><p>Instead, we will create a Development Container first, and attack our problems step by step.</p><h4>The Docker Development Container</h4><p>If you are not familiar with Dev Containers, I suggest you head over to <a href="https://containers.dev/">https://containers.dev/</a> and learn about them.</p><p>They’re an excellent way to develop code while working in an environment that closely mirrors — if not exactly matches — a production deployment.</p><p>Our <a href="https://github.com/tlangmo/sam-3d-objects-spark/blob/tl/spark/.devcontainer/Dockerfile">SAM3D container</a> will be based on the official Nvidia container for the Spark</p><p><em>nvcr.io/nvidia/cuda:13.0.1-devel-ubuntu24.04</em></p><p>It already comes with all the CUDA Toolkits and compilation toolchains installed.</p><p>Once we have our dev container up and running, we can tackle the dependencies of SAM3D one by one.</p><h4>Identify what is broken</h4><p>SAM3D lists over 100 Python packages as its dependencies. We need a strategy…</p><p>First, we identify which packages might already work, albeit maybe with a newer version. Most dependencies mentioned in SAM 3D are “pinned”, e.g. autoflake==2.3.1. While this is generally good practice, it also stands in our way.</p><p>Most package try to stay compatible in their API, so we do not really care whether we use autoflake 2.5.1, as long as it is available for aarch64 and our Python version.</p><p>After removing all version identifies we can start installing the dependencies via the <em>requirements.txt</em>. If one fails, simply comment it out and try to install the rest again. This “brute force” method works surprisingly well, and we are left only with a handful packages which we need to take care of.</p><ul><li>Open 3D</li><li>Kaolin</li><li>Pytorch 3D</li><li>cumm, spconv</li><li>diff-gaussian-rasterization</li><li>xatlas, usd-core [cpu only]</li></ul><h3>Building the wheels, one project at a time</h3><p>We need suitable binary wheels for each one, but the approach to get them differs for each project. It might involves code patches and yet more dev containers.</p><p>Still, for each one we can follow a simple recipe:</p><ol><li>Fork the original repo and create a new branch, e.g. <em>tl/spark</em></li><li>Make the necessary code changes</li><li>Build the wheel</li></ol><p>Some care has to be taken to keep them all compatible. We stick to Pytorch 2.9.x, Cuda 13.0 and Python 3.12</p><p>Head over to my Github <a href="https://github.com/tlangmo/">https://github.com/tlangmo/</a> to see the exact changes which have been necessary.</p><h4>A Index to rule them all</h4><p>Instead of manually copying these wheels around, we can create a custom Python Package Index, to make installation easy. Hosting one is actually quite easy — it is not more than a webpage with links.</p><p>If we put everything in a repo on Github, it is conveniently hosted for us.</p><p><a href="https://tlangmo.github.io/dgx-spark-wheels/index/">https://tlangmo.github.io/dgx-spark-wheels/index/</a></p><p>This github repo is also a great way to see exactly from what repo/branch the wheels are coming from</p><p><a href="https://github.com/tlangmo/dgx-spark-wheels/blob/main/packages.json">https://github.com/tlangmo/dgx-spark-wheels/blob/main/packages.json</a></p><h3>Bringing it all together</h3><p>Equipped with our extra index, we can now fly through the installation.</p><pre>1. Clone the repo which has the Spark changes<br># git clone git@github.com:tlangmo/sam-3d-objects-spark.git<br><br>2. Open VS Code and open Dev container<br># CTRL-P-O &quot;Open Dev Container&quot;<br><br>3. Open a Notebook and execute<br># E.g. /workspace/notebook/demo_single_object_mesh.ipynb<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*8uaYTJxqiMKCjSyDFsVYYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*CQJnKR3smBfQyZd0oLKoQA.png" /><figcaption>SAM3D generated mesh file on Spark DGX</figcaption></figure><h3>Conclusion</h3><p>Running complex ML projects on home hardware can be very rewarding. Without cloud bills to worry about, you’re free to experiment. Things may not work out of the box — but who doesn’t enjoy a bit of a challenge?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0afbc0465ee2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>