How to Fine-tune LLMs with Unsloth & Docker
Learn how to fine-tune LLMs or do Reinforcement Learning (RL) with Unsloth's Docker image.
⚡ Step-by-Step Tutorial
1
export NVIDIA_CONTAINER_TOOLKIT_VERSION=1.17.8-1
sudo apt-get update && sudo apt-get install -y \
nvidia-container-toolkit=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
nvidia-container-toolkit-base=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
libnvidia-container-tools=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
libnvidia-container1=${NVIDIA_CONTAINER_TOOLKIT_VERSION}
2
docker run -d -e JUPYTER_PASSWORD="mypassword" \
-p 8888:8888 -p 2222:22 \
-v $(pwd)/work:/workspace/work \
--gpus all \
unsloth/unsloth
3



4

📂 Container Structure
📖 Usage Example
Full Example
Setting up SSH Key
⚙️ Advanced Settings
Variable
Description
Default
🔒 Security Notes
Last updated
Was this helpful?

