Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f45a12420 | |||
| 6244d8985e | |||
| 4f418a8591 | |||
| 09affffc4a | |||
| cde9a581e4 | |||
| 2a524d3391 | |||
| 002f10e8fb | |||
| 7b05364824 | |||
| 3034311730 | |||
| f58b4fa820 | |||
| 68156c3eae | |||
| 0f49bfe445 | |||
| 363b7cd212 | |||
| 3d8d3fe84d | |||
| 2c0f69d0f3 | |||
| 1f2f1b60b9 | |||
| bfa9948115 | |||
| e543647d74 | |||
| d25050ffb7 | |||
| 9093d7bbd3 | |||
| adb83aa4d1 | |||
| eee8462216 | |||
| 02b05a99f1 | |||
| 917b15f35e | |||
| af56bb6603 | |||
| a182452605 | |||
| 995672804f | |||
| dccb9cfb4d | |||
| b1ae60d36f | |||
| c80d24411a | |||
| c9f2e3bf2f | |||
| d5de4893ec | |||
| 0b68bc2db0 | |||
| 6266b91c6d | |||
| feb21eb9a0 | |||
| 5e1f151630 |
@@ -0,0 +1,41 @@
|
|||||||
|
name: Docker Build and Release Upload
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- torchaudio-builder
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
# Build ComfyUI-Rocm
|
||||||
|
build-comfyui-cuda:
|
||||||
|
runs-on: alpine-linux
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to DockerHub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Log in to docker.mistox.net
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: docker.mistox.net
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: build and push comfyui-cuda
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--platform=linux/arm64 \
|
||||||
|
-t docker.mistox.net/comfyui-cuda-ampere:latest \
|
||||||
|
-t mistox/comfyui-cuda-ampere:latest \
|
||||||
|
-f comfyui-cuda-dockerfile \
|
||||||
|
--push \
|
||||||
|
.
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
name: Docker Build and Release Upload
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- torchaudio-builder
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
# Build ComfyUI-Rocm
|
||||||
|
build-comfyui-rocm:
|
||||||
|
runs-on: alpine-linux
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to DockerHub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Log in to docker.mistox.net
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: docker.mistox.net
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: build and push rocm-aarch64-base
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--platform=linux/arm64 \
|
||||||
|
-t docker.mistox.net/rocm-aarch64-base:latest \
|
||||||
|
-t mistox/rocm-aarch64-base:latest \
|
||||||
|
-f rocm-base-aarch64-dockerfile \
|
||||||
|
--push \
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: build and push comfyui-rocm
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--platform=linux/arm64 \
|
||||||
|
-t docker.mistox.net/comfyui-rocm-ampere:latest \
|
||||||
|
-t mistox/comfyui-rocm-ampere:latest \
|
||||||
|
-f comfyui-rocm-dockerfile \
|
||||||
|
--push \
|
||||||
|
.
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
name: Docker Build and Release Upload
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- torchaudio-builder
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
# Build uvicorn
|
||||||
|
build-uvicorn:
|
||||||
|
runs-on: alpine-linux
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to DockerHub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Log in to docker.mistox.net
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: docker.mistox.net
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: build and push uvicorn
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--platform=linux/arm64 \
|
||||||
|
-t docker.mistox.net/uvicorn-ampere:latest \
|
||||||
|
-t mistox/uvicorn-ampere:latest \
|
||||||
|
-f uvicorn-dockerfile \
|
||||||
|
--push \
|
||||||
|
.
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
name: Docker Build and Release Upload
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
# Build ComfyUI-Cuda
|
|
||||||
build-cuda:
|
|
||||||
runs-on: alpine-linux
|
|
||||||
steps:
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Log in to DockerHub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: build and push comfyui-cuda
|
|
||||||
run: |
|
|
||||||
docker buildx build \
|
|
||||||
--platform=linux/arm64 \
|
|
||||||
-t mistox/comfyui-cuda-ampere:latest \
|
|
||||||
-f comfyui-cuda-dockerfile \
|
|
||||||
--push \
|
|
||||||
.
|
|
||||||
|
|
||||||
# Build ComfyUI-Rocm
|
|
||||||
build-rocm:
|
|
||||||
runs-on: alpine-linux
|
|
||||||
steps:
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Log in to DockerHub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: build and push comfyui-rocm
|
|
||||||
run: |
|
|
||||||
docker buildx build \
|
|
||||||
--platform=linux/arm64 \
|
|
||||||
-t mistox/comfyui-rocm-ampere:latest \
|
|
||||||
-f comfyui-rocm-dockerfile \
|
|
||||||
--push \
|
|
||||||
.
|
|
||||||
|
|
||||||
# Job 3: Uvicorn Build
|
|
||||||
build-uvicorn:
|
|
||||||
runs-on: alpine-linux
|
|
||||||
steps:
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Log in to DockerHub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: build and push uvicorn
|
|
||||||
run: |
|
|
||||||
docker buildx build \
|
|
||||||
--platform=linux/arm64 \
|
|
||||||
-t mistox/uvicorn-ampere:latest \
|
|
||||||
-f uvicorn-dockerfile \
|
|
||||||
--push \
|
|
||||||
.
|
|
||||||
@@ -4,5 +4,8 @@ In order to use this repos please just copy the docker-compose
|
|||||||
|
|
||||||
ONLY TESTED WITH AMPERE ALTRA USING RTX40 SERIES
|
ONLY TESTED WITH AMPERE ALTRA USING RTX40 SERIES
|
||||||
|
|
||||||
https://hub.docker.com/r/mistox/uvicorn-ampere
|
https://hub.docker.com/r/mistox/uvicorn-ampere - working
|
||||||
https://hub.docker.com/r/mistox/comfyui-ampere
|
https://hub.docker.com/r/mistox/comfyui-cuda-ampere - working
|
||||||
|
|
||||||
|
https://hub.docker.com/r/mistox/rocm-aarch64-base - work in progress
|
||||||
|
https://hub.docker.com/r/mistox/comfyui-rocm-ampere - pending rocm-aarch64-base before testing
|
||||||
+28
-9
@@ -1,8 +1,31 @@
|
|||||||
# Get cuda version from https://hub.docker.com/r/nvidia/cuda
|
# Get cuda version from https://hub.docker.com/r/nvidia/cuda
|
||||||
FROM nvcr.io/nvidia/pytorch:25.05-py3 AS build-deps
|
FROM nvcr.io/nvidia/pytorch:26.04-py3 AS build-deps
|
||||||
|
|
||||||
# Install system dependencies
|
# Set ENV
|
||||||
RUN pip install imageio controlnet_aux
|
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
||||||
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ENV USE_CUDA=1
|
||||||
|
ENV BUILD_SOX=1
|
||||||
|
|
||||||
|
# Install system packages to build torchaudio
|
||||||
|
RUN apt update && \
|
||||||
|
apt upgrade -y && \
|
||||||
|
apt install -y \
|
||||||
|
libavformat-dev \
|
||||||
|
libavcodec-dev \
|
||||||
|
libavutil-dev \
|
||||||
|
libavdevice-dev \
|
||||||
|
libavfilter-dev \
|
||||||
|
libswresample-dev \
|
||||||
|
sox \
|
||||||
|
libsox-dev
|
||||||
|
|
||||||
|
# 2. Clone and build the torchaudio stable
|
||||||
|
RUN wget https://github.com/pytorch/audio/archive/refs/tags/v2.11.0.tar.gz && \
|
||||||
|
tar -xf v2.11.0.tar.gz && \
|
||||||
|
cd audio-2.11.0 && \
|
||||||
|
pip install --no-build-isolation --no-deps -v .
|
||||||
|
|
||||||
# Set working directory
|
# Set working directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -10,13 +33,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 .
|
||||||
|
|
||||||
# Link in python
|
# Install depencies
|
||||||
RUN ln -sf /usr/bin/python3 /usr/bin/python && \
|
|
||||||
ln -sf /usr/bin/pip3 /usr/bin/pip
|
|
||||||
|
|
||||||
# Install
|
|
||||||
RUN grep -vE "^(torch|#)" requirements.txt | xargs pip install && \
|
RUN grep -vE "^(torch|#)" requirements.txt | xargs pip install && \
|
||||||
pip install torchsde
|
pip install torchsde imageio controlnet_aux
|
||||||
|
|
||||||
# Set custom Nodes
|
# Set custom Nodes
|
||||||
WORKDIR /app/custom_nodes
|
WORKDIR /app/custom_nodes
|
||||||
|
|||||||
+13
-56
@@ -1,70 +1,27 @@
|
|||||||
# --- Stage 1: The Builder ---
|
# Use the rocm-base-aarch64-dockerfile
|
||||||
FROM ubuntu:24.04 AS builder
|
FROM mistox/rocm-aarch64-base:latest AS base
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
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 PYTHONUNBUFFERED=1
|
|
||||||
|
|
||||||
# Copy compiled ROCm from builder
|
|
||||||
COPY --from=builder /opt/rocm /opt/rocm
|
|
||||||
|
|
||||||
RUN apt update -y && apt install -y --no-install-recommends \
|
|
||||||
python3-pip python3-dev git libgl1 libglib2.0-0 \
|
|
||||||
libnuma1 libpci3 libelf1 \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
|
# Set Workdir
|
||||||
WORKDIR /app
|
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
|
# Install depencies
|
||||||
# NOTE: As of 2026, check the PyTorch nightly/stable index for the Aarch64-specific ROCm wheels
|
RUN grep -vE "^(torch|#)" requirements.txt | xargs pip install && \
|
||||||
RUN pip3 install --no-cache-dir torch torchvision torchaudio \
|
pip install torchsde imageio controlnet_aux
|
||||||
--index-url https://download.pytorch.org/whl/rocm6.2
|
|
||||||
|
|
||||||
# Install ComfyUI dependencies
|
# Set custom Nodes
|
||||||
RUN pip3 install --no-cache-dir -r requirements.txt
|
|
||||||
|
|
||||||
# Setup Manager
|
|
||||||
WORKDIR /app/custom_nodes
|
WORKDIR /app/custom_nodes
|
||||||
|
|
||||||
|
# Install ComfyUi Manager
|
||||||
RUN git clone https://github.com/Comfy-Org/ComfyUI-Manager.git
|
RUN git clone https://github.com/Comfy-Org/ComfyUI-Manager.git
|
||||||
|
|
||||||
|
# Go back to root
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Expose the default ComfyUI port
|
||||||
EXPOSE 8188
|
EXPOSE 8188
|
||||||
|
|
||||||
|
# Launch ComfyUI
|
||||||
CMD ["python3", "main.py", "--listen", "0.0.0.0"]
|
CMD ["python3", "main.py", "--listen", "0.0.0.0"]
|
||||||
@@ -0,0 +1,173 @@
|
|||||||
|
# Use the LTS Ubuntu repo
|
||||||
|
FROM ubuntu:26.04 AS reqs
|
||||||
|
# Set global build variables
|
||||||
|
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
||||||
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# My sad server with 96 Gbytes of ram keeps running out of ram ;(
|
||||||
|
# I would love to use the whole 80 core CPU ;(
|
||||||
|
ENV MAX_JOBS=5
|
||||||
|
|
||||||
|
# Install libraries
|
||||||
|
RUN apt update -y && \
|
||||||
|
apt upgrade -y && \
|
||||||
|
apt install -y --no-install-recommends \
|
||||||
|
ca-certificates \
|
||||||
|
wget \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
gfortran \
|
||||||
|
ninja-build \
|
||||||
|
g++ \
|
||||||
|
pkg-config \
|
||||||
|
xxd \
|
||||||
|
automake \
|
||||||
|
libtool \
|
||||||
|
libegl1-mesa-dev \
|
||||||
|
texinfo \
|
||||||
|
bison \
|
||||||
|
flex \
|
||||||
|
cmake \
|
||||||
|
build-essential \
|
||||||
|
libsimde-dev \
|
||||||
|
zlib1g-dev \
|
||||||
|
libncurses5-dev \
|
||||||
|
libopenblas-dev \
|
||||||
|
libjpeg-dev \
|
||||||
|
libpng-dev \
|
||||||
|
libavcodec-dev \
|
||||||
|
libavformat-dev \
|
||||||
|
libswscale-dev \
|
||||||
|
libpthreadpool-dev \
|
||||||
|
libgoogle-glog-dev \
|
||||||
|
libgtest-dev \
|
||||||
|
libbenchmark-dev \
|
||||||
|
libgdbm-dev \
|
||||||
|
libnss3-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libreadline-dev \
|
||||||
|
libffi-dev \
|
||||||
|
libsqlite3-dev \
|
||||||
|
libelf-dev \
|
||||||
|
libpciaccess-dev \
|
||||||
|
protobuf-compiler \
|
||||||
|
libprotobuf-dev \
|
||||||
|
libbz2-dev \
|
||||||
|
liblzma-dev \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
# Tested Working
|
||||||
|
|
||||||
|
# Build python 3.11
|
||||||
|
FROM reqs AS python
|
||||||
|
WORKDIR /build/python
|
||||||
|
RUN wget https://www.python.org/ftp/python/3.11.15/Python-3.11.15.tgz && \
|
||||||
|
tar -xf Python-3.11.15.tgz && \
|
||||||
|
cd Python-3.11.15 && \
|
||||||
|
./configure --enable-optimizations --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" && \
|
||||||
|
make -j 80 && \
|
||||||
|
make install && \
|
||||||
|
ldconfig /usr/local/lib && \
|
||||||
|
wget https://bootstrap.pypa.io/get-pip.py && \
|
||||||
|
python3 get-pip.py && \
|
||||||
|
ln -s /usr/local/bin/pip3 /bin/pip && \
|
||||||
|
ln -s /usr/local/bin/pip3 /bin/pip3 && \
|
||||||
|
ln -s /usr/local/bin/python3 /bin/python && \
|
||||||
|
ln -s /usr/local/bin/python3 /bin/python3.11
|
||||||
|
# Tested Working
|
||||||
|
|
||||||
|
# Build ROCm latest
|
||||||
|
FROM python AS rocm
|
||||||
|
WORKDIR /build/therock
|
||||||
|
COPY ./TheRock .
|
||||||
|
ENV CFLAGS="-Wno-error=discarded-qualifiers -fcommon -w"
|
||||||
|
ENV CXXFLAGS="-Wno-error=discarded-qualifiers -fcommon -w"
|
||||||
|
RUN env INSTALL_PREFIX=/usr/local ./dockerfiles/install_pinned_patchelf.sh && \
|
||||||
|
pip install -r requirements.txt && \
|
||||||
|
cmake -S . -B build \
|
||||||
|
-G Ninja \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DTHEROCK_AMDGPU_TARGETS="gfx1100" \
|
||||||
|
-DTHEROCK_DIST_AMDGPU_FAMILIES="gfx1100" \
|
||||||
|
-DTHEROCK_AMDGPU_DIST_BUNDLE_NAME="gfx1100" \
|
||||||
|
-DLLVM_HOST_TRIPLE="aarch64-unknown-linux-gnu" \
|
||||||
|
-DLLVM_DEFAULT_TARGET_TRIPLE="aarch64-unknown-linux-gnu" \
|
||||||
|
-DCMAKE_C_FLAGS="$CFLAGS" \
|
||||||
|
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
|
||||||
|
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi" \
|
||||||
|
-DLLVM_ENABLE_PROJECTS="clang;lld;flang" \
|
||||||
|
-DCOMPILER_RT_BUILD_SANITIZERS=OFF \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=./install && \
|
||||||
|
cmake --build build -- -j${MAX_JOBS}
|
||||||
|
# Work in progress [ Breaking due to x86 intrinsics not ported to Aarch64 ]
|
||||||
|
|
||||||
|
# Build pytorch
|
||||||
|
FROM rocm AS pytorch
|
||||||
|
# Setup Envronment
|
||||||
|
ENV PYTORCH_ROCM_ARCH=1100
|
||||||
|
ENV USE_ROCM=1
|
||||||
|
ENV USE_CUDA=0
|
||||||
|
ENV USE_AOTRITON=0
|
||||||
|
ENV USE_SYSTEM_PTHREADPOOL=1
|
||||||
|
ENV USE_SYSTEM_PROTOC=1
|
||||||
|
ENV BUILD_CUSTOM_PROTOBUF=OFF
|
||||||
|
ENV USE_PYTORCH_QNNPACK=OFF
|
||||||
|
ENV USE_XNNPACK=OFF
|
||||||
|
ENV USE_ONNX=OFF
|
||||||
|
ENV USE_QNNPACK=OFF
|
||||||
|
ENV USE_NNPACK=OFF
|
||||||
|
ENV USE_KINETO=OFF
|
||||||
|
ENV USE_OPENMP=OFF
|
||||||
|
ENV USE_TENSORPIPE=OFF
|
||||||
|
ENV ROCM_PATH=/usr
|
||||||
|
ENV DEVICE_LIB_PATH=/usr/lib/llvm-21/lib/clang/21/amdgcn/bitcode
|
||||||
|
ENV HIPFLAGS="--rocm-device-lib-path=$DEVICE_LIB_PATH"
|
||||||
|
ENV CMAKE_ARGS="-DCMAKE_HIP_COMPILER_WORKS=1 \
|
||||||
|
-DCMAKE_CXX_COMPILER_WORKS=1 \
|
||||||
|
-DCMAKE_C_COMPILER_WORKS=1 \
|
||||||
|
-DCMAKE_HIP_COMPILER_ROCM_LIB_PATH=$DEVICE_LIB_PATH \
|
||||||
|
-DCMAKE_HIP_FLAGS=--rocm-device-lib-path=$DEVICE_LIB_PATH \
|
||||||
|
-DCMAKE_C_COMPILER=/usr/lib/llvm-21/bin/clang \
|
||||||
|
-DCMAKE_CXX_COMPILER=/usr/lib/llvm-21/bin/clang++ \
|
||||||
|
-DCMAKE_HIP_COMPILER=/usr/lib/llvm-21/bin/clang++ \
|
||||||
|
-DPython3_ROOT_DIR=/usr/local \
|
||||||
|
-DPYTHON_EXECUTABLE=/usr/local/bin/python3.11 \
|
||||||
|
-DPYTHON_LIBRARY=/usr/local/lib/libpython3.11.so \
|
||||||
|
-DPYTHON_INCLUDE_DIR=/usr/local/include/python3.11"
|
||||||
|
# Pull and build pytorch
|
||||||
|
WORKDIR /build/pytorch
|
||||||
|
RUN git clone https://github.com/pytorch/pytorch.git && \
|
||||||
|
cd pytorch && \
|
||||||
|
git submodule update --init --recursive && \
|
||||||
|
make triton && \
|
||||||
|
python tools/amd_build/build_amd.py && \
|
||||||
|
pip install -r requirements.txt && \
|
||||||
|
mkdir -p /opt/rocm/bin \
|
||||||
|
ln -s /usr/bin/hipcc /opt/rocm/bin/hipcc \
|
||||||
|
ln -s /usr/lib/llvm-21/bin/clang++ /usr/bin/clang++ \
|
||||||
|
python3 setup.py build && \
|
||||||
|
python3 setup.py install
|
||||||
|
# Failing
|
||||||
|
|
||||||
|
# Build pytorch-audio
|
||||||
|
FROM pytorch AS torchaudio
|
||||||
|
WORKDIR /build/torchaudio
|
||||||
|
RUN wget https://github.com/pytorch/audio/archive/refs/tags/v2.11.0.tar.gz && \
|
||||||
|
tar -xf v2.11.0.tar.gz && \
|
||||||
|
cd audio-2.11.0 && \
|
||||||
|
pip install --no-build-isolation --no-deps -v .
|
||||||
|
# Tested Working via comfyui-cuda-dockerfile
|
||||||
|
|
||||||
|
# Build pytorch-vision
|
||||||
|
FROM torchaudio AS torchvision
|
||||||
|
WORKDIR /build/torchaudio
|
||||||
|
ENV FORCE_CUDA=0
|
||||||
|
RUN git clone https://github.com/pytorch/vision.git . && \
|
||||||
|
pip install numpy pillow ninja setuptools wheel && \
|
||||||
|
python setup.py bdist_wheel && \
|
||||||
|
pip install dist/torchvision-*.whl
|
||||||
|
# Not tested and not verified ROCM build
|
||||||
|
|
||||||
|
# Build final stripped down image
|
||||||
|
FROM ubuntu:26.04
|
||||||
|
# Copy in rocm, pytorch, torchaudio, torchvision
|
||||||
@@ -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