Files
docker_compose/unsloth.yaml
T
2026-10-29 20:40:49 -05:00

63 lines
2.2 KiB
YAML

services:
unsloth-train:
image: unsloth/unsloth-rocm:studio # pin a tag or digest once it works
container_name: unsloth-train
restart: no
#command: sleep infinity do not use with studio version
#The container runs as root by default. `--user <uid>:<gid>` is supported and keeps files on your mounts owned by you.
ipc: host
#deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# device_ids: ["0"] #Explicit list of GPU identifiers (index "0", "1" or hardware UUID "GPU-xxx").
# capabilities: [gpu]
devices:
- /dev/kfd:/dev/kfd
#- /dev/dri:/dev/dri
- /dev/dri/renderD128:/dev/dri/renderD128
group_add:
- 44 # getent group video | cut -d: -f3
- 992 # getent group render | cut -d: -f3
ulimits:
memlock: -1
stack: 67108864
ports:
- 8075:8000 # Unsloth Studio
- 8777:8888 # JupyterLab
environment:
- JUPYTER_PASSWORD=${JUPYTER_PWD}
- UNSLOTH_STUDIO_PASSWORD=${UNSLOTH_STUDIO_PASSWORD:-}
- HF_TOKEN=${HF_TOKEN:-} # hugging face token
- WANDB_API_KEY=${WANDB_API_KEY:-} # weights and biases key
- UNSLOTH_ALLOW_CPU=${UNSLOTH_ALLOW_CPU:-0}
volumes:
#The container working directory is `/workspace`. Mount `/data` for unified persistence across container recreations
- /srv/docker/server/unsloth/host:/workspace/host # project directory
- /srv/docker/server/unsloth/notebooks:/workspace/unsloth-notebooks # synced notebooks
- unsloth-cache:/workspace/.cache/huggingface # Model Downloads
#- unsloth-data:/data #Unified persistence root: models, fine-tune outputs, exports, and auth db
- unsloth-studio:/opt/unsloth-studio # studio data
- /mnt/raid1/data/hoard/medical_studies:/workspace/host/studies
labels:
- homepage.group=Development
- homepage.name=Unsloth
- homepage.icon=sh-unsloth.png
- homepage.description=LLM Training
- rackpeek.tags=ai
networks:
- ollama-net
networks:
ollama-net:
external: true
volumes:
unsloth-cache:
unsloth-data:
unsloth-studio: