Skip to content

Commit

Permalink
move dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
joelberkeley committed Jan 1, 2025
1 parent f0bd597 commit 129cbe0
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 34 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ jobs:
run: |
shopt -s extglob nullglob globstar
shellcheck **/*.sh
build-bazel-ubuntu2404-docker:
build-openxla-dev-docker:
runs-on: ubuntu-24.04
steps:
- uses: docker/setup-buildx-action@v3
- name: Build and export
uses: docker/build-push-action@v6
with:
file: spidr/backend/build.Dockerfile
tags: bazel-ubuntu2404
outputs: type=docker,dest=/tmp/bazel-ubuntu2404.tar
file: openxla-dev.Dockerfile
tags: openxla-dev
outputs: type=docker,dest=/tmp/openxla-dev.tar
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bazel-ubuntu2404
path: /tmp/bazel-ubuntu2404.tar
name: openxla-dev
path: /tmp/openxla-dev.tar
pjrt-linux-x86_64:
needs:
- build-bazel-ubuntu2404-docker
- build-openxla-dev-docker
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
Expand All @@ -44,15 +44,15 @@ jobs:
- name: Download bazel Docker image
uses: actions/download-artifact@v4
with:
name: bazel-ubuntu2404
name: openxla-dev
path: /tmp
- name: Build PJRT + XLA binary
run: |
if [ ! "$(git diff --exit-code HEAD^ spidr/backend/VERSION)" ]; then
curl -LO --fail-with-body "https://github.com/joelberkeley/spidr/releases/download/c-xla-v$(cat spidr/backend/VERSION)/libc_xla-linux-x86_64.so"
else
docker load --input /tmp/bazel-ubuntu2404.tar
docker run -v $(pwd):/spidr -w /spidr bazel-ubuntu2404 sh -c "./spidr/backend/build.sh"
docker load --input /tmp/openxla-dev.tar
docker run -v $(pwd):/spidr -w /spidr openxla-dev sh -c "./spidr/backend/build.sh"
fi
mv libc_xla-linux-x86_64.so libc_xla.so
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
if-no-files-found: error
pjrt-plugin-xla-cpu-linux-x86_64:
needs:
- build-bazel-ubuntu2404-docker
- build-openxla-dev-docker
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
Expand All @@ -94,7 +94,7 @@ jobs:
- name: Download bazel Docker image
uses: actions/download-artifact@v4
with:
name: bazel-ubuntu2404
name: openxla-dev
path: /tmp
- name: Build or fetch XLA CPU PJRT plugin
run: |
Expand All @@ -103,8 +103,8 @@ jobs:
rev=$(cat XLA_VERSION)
curl -LO --fail-with-body "https://github.com/joelberkeley/spidr/releases/download/xla-$(short_revision $rev)/pjrt_plugin_xla_cpu-linux-x86_64.so"
else
docker load --input /tmp/bazel-ubuntu2404.tar
docker run -v $(pwd):/spidr -w /spidr bazel-ubuntu2404 sh -c "./pjrt-plugins/xla-cpu/build.sh"
docker load --input /tmp/openxla-dev.tar
docker run -v $(pwd):/spidr -w /spidr openxla-dev sh -c "./pjrt-plugins/xla-cpu/build.sh"
fi
mv pjrt_plugin_xla_cpu-linux-x86_64.so pjrt_plugin_xla_cpu.so
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
if-no-files-found: error
pjrt-plugin-xla-cuda-linux-x86_64:
needs:
- build-bazel-ubuntu2404-docker
- build-openxla-dev-docker
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
Expand All @@ -148,7 +148,7 @@ jobs:
- name: Download bazel Docker image
uses: actions/download-artifact@v4
with:
name: bazel-ubuntu2404
name: openxla-dev
path: /tmp
- name: Build or fetch XLA CUDA PJRT plugin
run: |
Expand All @@ -157,8 +157,8 @@ jobs:
rev=$(cat XLA_VERSION)
curl -LO --fail-with-body "https://github.com/joelberkeley/spidr/releases/download/xla-$(short_revision $rev)/pjrt_plugin_xla_cuda-linux-x86_64.so"
else
docker load --input /tmp/bazel-ubuntu2404.tar
docker run -v $(pwd):/spidr -w /spidr bazel-ubuntu2404 sh -c "./pjrt-plugins/xla-cuda/build.sh"
docker load --input /tmp/openxla-dev.tar
docker run -v $(pwd):/spidr -w /spidr openxla-dev sh -c "./pjrt-plugins/xla-cuda/build.sh"
fi
mv pjrt_plugin_xla_cuda-linux-x86_64.so pjrt_plugin_xla_cuda.so
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-c-xla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
- uses: actions/checkout@v4
- name: Build C XLA lib
run: |
docker build -t bazel-ubuntu2404 -f bazel-ubuntu2404.Dockerfile .
docker run -v $(pwd):/spidr -w /spidr bazel-ubuntu2404 sh -c "./spidr/backend/build.sh"
docker build -t openxla-dev -f openxla-dev.Dockerfile .
docker run -v $(pwd):/spidr -w /spidr openxla-dev sh -c "./spidr/backend/build.sh"
- name: Publish C XLA lib
uses: actions/upload-release-asset@v1
env:
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/release-xla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,37 +26,37 @@ jobs:
tag_name: xla-${{ env.XLA_REV }}
release_name: XLA revision ${{ env.XLA_REV }}
body: "XLA revision ${{ env.XLA_REV }}"
build-bazel-ubuntu2404-docker:
build-openxla-dev-docker:
runs-on: ubuntu-24.04
steps:
- uses: docker/setup-buildx-action@v3
- name: Build and export
uses: docker/build-push-action@v6
with:
file: spidr/backend/build.Dockerfile
tags: bazel-ubuntu2404
outputs: type=docker,dest=/tmp/bazel-ubuntu2404.tar
file: openxla-dev.Dockerfile
tags: openxla-dev
outputs: type=docker,dest=/tmp/openxla-dev.tar
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bazel-ubuntu2404
path: /tmp/bazel-ubuntu2404.tar
name: openxla-dev
path: /tmp/openxla-dev.tar
pjrt-plugin-xla-cpu-linux-x86_64:
needs:
- create-release
- build-bazel-ubuntu2404-docker
- build-openxla-dev-docker
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Download bazel Docker image
uses: actions/download-artifact@v4
with:
name: bazel-ubuntu2404
name: openxla-dev
path: /tmp
- name: Build XLA CPU plugin for Linux x86_64
run: |
docker build -t bazel-ubuntu2404 -f bazel-ubuntu2404.Dockerfile .
docker run -v $(pwd):/spidr -w /spidr bazel-ubuntu2404 sh -c "./pjrt-plugins/xla-cpu/build.sh"
docker build -t openxla-dev -f bazel-ubuntu2404.Dockerfile .
docker run -v $(pwd):/spidr -w /spidr openxla-dev sh -c "./pjrt-plugins/xla-cpu/build.sh"
- name: Publish XLA CPU plugin
uses: actions/upload-release-asset@v1
env:
Expand Down Expand Up @@ -85,19 +85,19 @@ jobs:
pjrt-plugin-xla-cuda-linux-x86_64:
needs:
- create-release
- build-bazel-ubuntu2404-docker
- build-openxla-dev-docker
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Download bazel Docker image
uses: actions/download-artifact@v4
with:
name: bazel-ubuntu2404
name: openxla-dev
path: /tmp
- name: Build XLA CUDA plugin for Linux x86_64
run: |
docker build -t bazel-ubuntu2404 -f bazel-ubuntu2404.Dockerfile .
docker run -v $(pwd):/spidr -w /spidr bazel-ubuntu2404 sh -c "./pjrt-plugins/xla-cuda/build.sh"
docker build -t openxla-dev -f openxla-dev.Dockerfile .
docker run -v $(pwd):/spidr -w /spidr openxla-dev sh -c "./pjrt-plugins/xla-cuda/build.sh"
- name: Publish XLA CUDA plugin
uses: actions/upload-release-asset@v1
env:
Expand Down
File renamed without changes.

0 comments on commit 129cbe0

Please sign in to comment.