From db39f0d67194e1462c2bc7ffc83f43626a2779f8 Mon Sep 17 00:00:00 2001 From: badmark Date: Wed, 19 Aug 2026 09:22:51 -0600 Subject: [PATCH] first commit --- Dockerfile | 27 +++++++++++++++++++++++++++ run-cmd.txt | 18 ++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 Dockerfile create mode 100644 run-cmd.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a6c8b82 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +# Unsloth Studio on AMD GPU (780M) +FROM rocm/pytorch:rocm6.4.2_ubuntu24.04_py3.12_pytorch_release_2.4.1 + +# Install system dependencies +RUN apt-get update && \ + apt-get install -y curl git wget ffmpeg libglvnd libegl-mesa0 libdrm2 + +# Install Unsloth Studio with RoCM support +RUN pip install --upgrade pip && \ + pip install unsloth[studio] torch>=2.4.1 && \ + rm -rf /root/.cache/pip + +# Set working directory +WORKDIR /app + +# Copy application files +COPY . /app/ + +# Create a volume for persistent storage (weights, checkpoints) +VOLUME ["/data"] + +# Environment variables for AMD GPU compatibility +ENV UNSLOTH_ALLOW_XLA=1 \ + PYTORCH_CUDA_ALLOC_FAIL=0 + +# Run Unsloth Studio with the model path +CMD ["unsloth", "studio", "--cpu", "--gpu", "0", "--model", "/data/my-model"] diff --git a/run-cmd.txt b/run-cmd.txt new file mode 100644 index 0000000..3b67c8f --- /dev/null +++ b/run-cmd.txt @@ -0,0 +1,18 @@ +docker run -it --rm \ + --device /dev/kfd \ + --device /dev/dri \ + --ipc=host \ + --shm-size=8g \ + --cap-add=SYS_PTRACE \ + --security-opt seccomp=unconfined \ + --group-add video \ + -e HSA_OVERRIDE_GFX_VERSION=11.0.2 \ + -p 8888:8888 \ + unsloth-amd-igpu + + + + + + #rocm/pytorch:rocm6.2_ubuntu22.04_py3.10_pytorch_release-2.3.0 \ + # bash \ No newline at end of file