first commit
This commit is contained in:
parent
ebc825ec82
commit
db39f0d671
2 changed files with 45 additions and 0 deletions
27
Dockerfile
Normal file
27
Dockerfile
Normal file
|
|
@ -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"]
|
||||||
18
run-cmd.txt
Normal file
18
run-cmd.txt
Normal file
|
|
@ -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
|
||||||
Loading…
Add table
Reference in a new issue