Unsloth Spark is a Docker-based environment for running Unsloth, a library that enables faster LLM fine-tuning with minimal memory usage.
This project take's NVIDIA's PyTorch container, upgrades a few libs per Unsloth's Dockerfile, then tries to emulate Unsloth's own unsloth/unsloth container by cloning in their notebooks and installing Jupyter.
I imagine this will not be needed if Unsloth creates their own native image. As of today, 11/19/2025, that is not the case.
- DGX Spark or related 3rd party device
-
Clone this repository:
git clone https://github.com/eleqtrizit/Unsloth-DGX-Spark.git cd unsloth_spark -
Build the container:
make build
-
Login to container bash:
make run
-
Test (after
make run)!cd work && python test_unsloth.py
## Makefile Commands
The project includes a Makefile with the following commands:
```sh
> make
Available targets:
build - Build the container
build-no-cache - Build the container without using cache
run - Run bash from the container
clean - Remove the container image
jupyter - Run JupyterLab from the container
Read the Makefile for example commands. Ask an LLM what the params mean if you're unsure.
- Based on NVIDIA's PyTorch container (25.09-py3) for GPU optimization
- Pre-installed JupyterLab for interactive development
- Volume mounting for persistent work data
The test_unsloth.py script demonstrates how to:
- Load a pre-quantized 4-bit model
- Apply LoRA fine-tuning
- Train on a dataset using SFTTrainer
Simply rebuild. make build