Compare commits
2 Commits
fdeeed9f18
...
feb21eb9a0
| Author | SHA1 | Date | |
|---|---|---|---|
| feb21eb9a0 | |||
| 5e1f151630 |
+15
-45
@@ -1,41 +1,7 @@
|
|||||||
# --- Stage 1: The Builder ---
|
# Use the official ROCm base image
|
||||||
FROM ubuntu:24.04 AS builder
|
FROM ubuntu:26.04
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
# Set environment variables for 7900 XTX (gfx1100)
|
||||||
RUN apt update && apt install -y \
|
|
||||||
git cmake ninja-build python3-pip python3-venv \
|
|
||||||
libnuma-dev libpci-dev libelf-dev libdrm-dev \
|
|
||||||
build-essential g++-13 gcc-13
|
|
||||||
|
|
||||||
WORKDIR /src
|
|
||||||
RUN git clone https://github.com/ROCm/TheRock.git
|
|
||||||
WORKDIR /src/TheRock
|
|
||||||
|
|
||||||
# Configure for gfx1100 (7900 XTX) on Aarch64
|
|
||||||
# We use a venv to manage the build tools
|
|
||||||
RUN python3 -m venv venv && \
|
|
||||||
./venv/bin/pip install --upgrade pip && \
|
|
||||||
./venv/bin/pip install -r requirements.txt
|
|
||||||
|
|
||||||
# Compile a subset of ROCm (HIP + KFD) needed for runtime
|
|
||||||
RUN cmake -S . -B build \
|
|
||||||
-G Ninja \
|
|
||||||
-DTHEROCK_AMDGPU_TARGETS="gfx1100" \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=/opt/rocm \
|
|
||||||
-DTHEROCK_ENABLE_ALL=OFF \
|
|
||||||
-DTHEROCK_ENABLE_HIP=ON \
|
|
||||||
-DTHEROCK_ENABLE_ROCBLAS=ON
|
|
||||||
|
|
||||||
RUN cmake --build build --target install
|
|
||||||
|
|
||||||
# --- Stage 2: Final Runtime ---
|
|
||||||
FROM ubuntu:24.04
|
|
||||||
|
|
||||||
# Core Environment Variables
|
|
||||||
ENV HSA_OVERRIDE_GFX_VERSION=11.0.0
|
|
||||||
ENV TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1
|
|
||||||
ENV ROCM_PATH=/opt/rocm
|
|
||||||
ENV LD_LIBRARY_PATH=/opt/rocm/lib:/usr/lib/aarch64-linux-gnu:$LD_LIBRARY_PATH
|
|
||||||
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
@@ -43,8 +9,16 @@ ENV PYTHONUNBUFFERED=1
|
|||||||
COPY --from=builder /opt/rocm /opt/rocm
|
COPY --from=builder /opt/rocm /opt/rocm
|
||||||
|
|
||||||
RUN apt update -y && apt install -y --no-install-recommends \
|
RUN apt update -y && apt install -y --no-install-recommends \
|
||||||
python3-pip python3-dev git libgl1 libglib2.0-0 \
|
rocm-dev \
|
||||||
libnuma1 libpci3 libelf1 \
|
rocm-libs \
|
||||||
|
rocminfo \
|
||||||
|
python3-pip \
|
||||||
|
python3-dev \
|
||||||
|
python3-torch-rocm \
|
||||||
|
python3-torchaudio \
|
||||||
|
git \
|
||||||
|
libgl1 \
|
||||||
|
libglib2.0-0 \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -52,13 +26,9 @@ WORKDIR /app
|
|||||||
# Clone ComfyUI
|
# Clone ComfyUI
|
||||||
RUN git clone https://github.com/comfyanonymous/ComfyUI.git .
|
RUN git clone https://github.com/comfyanonymous/ComfyUI.git .
|
||||||
|
|
||||||
# Install PyTorch Aarch64 ROCm Wheels
|
|
||||||
# NOTE: As of 2026, check the PyTorch nightly/stable index for the Aarch64-specific ROCm wheels
|
|
||||||
RUN pip3 install --no-cache-dir torch torchvision torchaudio \
|
|
||||||
--index-url https://download.pytorch.org/whl/rocm6.2
|
|
||||||
|
|
||||||
# Install ComfyUI dependencies
|
# Install ComfyUI dependencies
|
||||||
RUN pip3 install --no-cache-dir -r requirements.txt
|
RUN grep -vE 'torch|torchaudio|torchvision' requirements.txt > req_no_torch.txt \
|
||||||
|
&& pip3 install --no-cache-dir -r req_no_torch.txt
|
||||||
|
|
||||||
# Setup Manager
|
# Setup Manager
|
||||||
WORKDIR /app/custom_nodes
|
WORKDIR /app/custom_nodes
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ services:
|
|||||||
- OLLAMA_KEEP_ALIVE=24h
|
- OLLAMA_KEEP_ALIVE=24h
|
||||||
- HSA_OVERRIDE_GFX_VERSION=11.0.0 # This is for the RX 7900XTX
|
- HSA_OVERRIDE_GFX_VERSION=11.0.0 # This is for the RX 7900XTX
|
||||||
devices:
|
devices:
|
||||||
- /dev/kfd:/dev/kfd # Shared surface driver for ROCm
|
- /dev/kfd:/dev/kfd
|
||||||
- /dev/dri:/dev/dri # Direct Rendering Infrastructure for GPU access
|
- /dev/dri:/dev/dri
|
||||||
|
|
||||||
ollama-webui:
|
ollama-webui:
|
||||||
container_name: ai-ollama-webui
|
container_name: ai-ollama-webui
|
||||||
|
|||||||
Reference in New Issue
Block a user