This commit is contained in:
AbdBarho 2022-10-14 17:26:44 +02:00
parent 3015742fc3
commit 125d91e2d2
2 changed files with 7 additions and 15 deletions

View file

@ -1,21 +1,18 @@
name: Build Xformers
on: [push]
on:
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
# container:
# image: pytorch/manylinux-cuda113
container:
image: python:3.10-slim
env:
DEBIAN_FRONTEND: noninteractive
XFORMERS_DISABLE_FLASH_ATTN: 1
FORCE_CUDA: 1
# TORCH_CUDA_ARCH_LIST: "3.7;5.0;5.2;6.0;6.1+PTX;7.0;7.5+PTX;8.0;8.6+PTX"
TORCH_CUDA_ARCH_LIST: "6.1"
NVCC_FLAGS: "--use_fast_math -DXFORMERS_MEM_EFF_ATTENTION_DISABLE_BACKWARD"
TORCH_CUDA_ARCH_LIST: "3.7;5.0;5.2;6.0;6.1+PTX;7.0;7.5+PTX;8.0;8.6+PTX"
steps:
- run: |
apt-get update
@ -29,8 +26,8 @@ jobs:
pip install ninja install torch --extra-index-url https://download.pytorch.org/whl/cu113
pip wheel --wheel-dir=data git+https://github.com/facebookresearch/xformers.git@ba93c5012d00bd1b010514a7bc9bd938c1ad6149#egg=xformers
- name: Archive production artifacts
- name: Artifacts
uses: actions/upload-artifact@v3
with:
name: dist-without-markdown
name: xformers
path: data/xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl

View file

@ -20,12 +20,6 @@ EOF
RUN git clone https://github.com/crowsonkb/k-diffusion.git repositories/k-diffusion && cd repositories/k-diffusion && git reset --hard f4e99857772fc3a126ba886aadf795a332774878
# FROM pytorch/manylinux-cuda113 as xformers
# RUN git clone https://github.com/facebookresearch/xformers /x
# WORKDIR /x
# ENV CU_VERSION=cu113 PYTHON_VERSION=3.10 PYTORCH_VERSION=1.12
# RUN ./packaging/build_wheel.sh
FROM python:3.10-slim
@ -72,7 +66,8 @@ RUN pip install --prefer-binary --no-cache-dir opencv-python-headless \
git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1 \
pyngrok
# COPY --from=xformers /x/wheels /wheels
COPY xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl .
RUN pip install xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl
COPY . /docker
RUN <<EOF