Skip to content

Commit

Permalink
Build changes docker update.
Browse files Browse the repository at this point in the history
Signed-off-by: Govind Kamat <govkamat@amazon.com>
  • Loading branch information
gkamat committed Sep 9, 2024
1 parent 57aa1de commit 3416322
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Release drafter
name: Publish Release to GitHub

on:
push:
tags:
- "*"

jobs:
draft-a-release:
publish-release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
Expand All @@ -22,21 +22,20 @@ jobs:
issue-title: 'Release opensearch-benchmark'
issue-body: "Please approve or deny the release of opensearch-benchmark. **Tag**: ${{ github.ref_name }} **Commit**: ${{ github.sha }}"
exclude-workflow-initiator-as-approver: true

- name: Set up Python 3
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install build tools
run: |
python -m pip install --upgrade build

- name: Build project for distribution
run: |
python -m build
tar -zvcf artifacts.tar.gz dist
- name: Release
make build
tar zcvf artifacts.tar.gz dist
- name: Publish release
uses: softprops/action-gh-release@v1
with:
draft: true
generate_release_notes: true
files: |
artifacts.tar.gz
files: artifacts.tar.gz
9 changes: 6 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ RUN apt-get -y update && \

COPY . opensearch-benchmark

RUN cd opensearch-benchmark; make wheel
RUN set -ex; \
cd opensearch-benchmark; \
make build; \
test "`uname -m`" = aarch64 && pip install yappi && cp "`pip cache list --format abspath | grep yappi`" dist


#
Expand All @@ -30,15 +33,15 @@ RUN groupadd --gid 1000 opensearch-benchmark && \
RUN mkdir -p /opensearch-benchmark/.benchmark && \
chown -R 1000:0 /opensearch-benchmark/.benchmark

COPY --from=build-stage /opensearch-benchmark/opensearch-benchmark/yappi-*.whl /opensearch-benchmark/opensearch-benchmark/opensearch_benchmark-*.whl ./
COPY --from=build-stage /opensearch-benchmark/opensearch-benchmark/dist/yappi-*.whl /opensearch-benchmark/opensearch-benchmark/dist/opensearch_benchmark-*.whl ./

# There is no binary package currently available for yappi on ARM.
RUN set -ex; \
apt-get -y update; \
apt-get install -y git pbzip2; \
apt-get -y upgrade; \
rm -rf /var/lib/apt/lists/*; \
PIP_ONLY_BINARY=h5py pip install yappi-*.whl opensearch_benchmark-*.whl; \
PIP_ONLY_BINARY=h5py pip install *.whl; \
rm *.whl

USER 1000
Expand Down

0 comments on commit 3416322

Please sign in to comment.