From dccb9cfb4da14b70a074419de664cc697bdb3805 Mon Sep 17 00:00:00 2001 From: Derek Holloway Date: Mon, 27 Apr 2026 16:57:28 -0700 Subject: [PATCH] init test --- .gitea/workflows/build.yaml | 52 +------------------------------------ comfyui-rocm-dockerfile | 27 +++++++++++++++++-- 2 files changed, 26 insertions(+), 53 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 0f8bad8..59cd13a 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -3,35 +3,10 @@ name: Docker Build and Release Upload on: push: branches: - - main + - torchaudio-builder 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 @@ -55,29 +30,4 @@ jobs: -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 \ . \ No newline at end of file diff --git a/comfyui-rocm-dockerfile b/comfyui-rocm-dockerfile index 4e28d6b..707647d 100644 --- a/comfyui-rocm-dockerfile +++ b/comfyui-rocm-dockerfile @@ -1,21 +1,44 @@ # Use the official ROCm base image -FROM ubuntu:26.04 +FROM ubuntu:26.04 as reqs # Set environment variables for 7900 XTX (gfx1100) ENV PIP_BREAK_SYSTEM_PACKAGES=1 ENV PYTHONUNBUFFERED=1 +ENV DEBIAN_FRONTEND=noninteractive +ENV ROCM_PATH=/opt/rocm +ENV PYTORCH_ROCM_ARCH=gfx1100 +ENV HIP_VISIBLE_DEVICES=0 +ENV PYTORCH_ROCM_ARCH=your_gfx_arch RUN apt update -y && apt install -y --no-install-recommends \ rocm \ python3-pip \ python3-dev \ python3-torch-rocm \ - python3-torchaudio \ git \ libgl1 \ libglib2.0-bin \ + cmake \ + ninja-build \ + pkg-config \ + libavcodec-dev \ + libavformat-dev \ + libswresample-dev \ && rm -rf /var/lib/apt/lists/* +FROM reqs as torch-audio + +WORKDIR /builder + +RUN git clone https://github.com/pytorch/audio.git && \ + cd audio && \ + git submodule update --init --recursive && \ + # We must ensure it uses the system python/torch + BUILD_ROCM=1 python3 setup.py install && \ + cd .. && rm -rf audio + +FROM torch-audio as runner + WORKDIR /app # Clone ComfyUI