From ca0553c24acb7da072314c1b4f31bc3a84d79460 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Mon, 22 Apr 2024 20:21:21 -0400 Subject: [PATCH 01/29] feat: setup semantic release --- .github/workflows/delete_untagged.py | 25 +++++++++ .github/workflows/release.yml | 84 ++++++++++++++++++++++++++++ .releaserc.yaml | 18 ++++++ package.json | 16 ++++++ 4 files changed, 143 insertions(+) create mode 100755 .github/workflows/delete_untagged.py create mode 100644 .github/workflows/release.yml create mode 100644 .releaserc.yaml create mode 100644 package.json diff --git a/.github/workflows/delete_untagged.py b/.github/workflows/delete_untagged.py new file mode 100755 index 0000000..c89492e --- /dev/null +++ b/.github/workflows/delete_untagged.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python3 + +import argparse +import json +import requests +import types + +parser = argparse.ArgumentParser() +parser.add_argument("token", help="GitHub token") +args = parser.parse_args() + +domain = "api.github.com" +org = "BNLNPPS" +package_type = "container" +package_name = "esi-opticks" + +api_url = f"https://{domain}/orgs/{org}/packages/{package_type}/{package_name}/versions" + +respjson = requests.get(api_url, auth=("token", args.token)) +entries = json.loads(respjson.text, object_hook=lambda d: types.SimpleNamespace(**d)) + +for e in entries: + if not e.metadata.container.tags: + response = requests.delete(api_url + f"/{e.id}", auth=("token", args.token)) + print("delete", e.id, e.html_url, e.name, response.url, response.status_code) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0ce0c0e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,84 @@ +name: Release + +on: + push: + branches: + - main + - beta + +jobs: + build-test-release: + runs-on: [gpu] + steps: + - name: Define environment variables + run: echo IMAGE_NAME=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV + + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Important for Semantic Release to analyze all commits + + - name: Set up docker buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build image locally + uses: docker/build-push-action@v5 + with: + tags: ${{ env.IMAGE_NAME }}:latest + pull: true + load: true + cache-from: ${{ env.IMAGE_NAME }}:latest + cache-to: type=inline + + - name: Run tests + run: docker run ${{ env.IMAGE_NAME }}:latest curl --version + + - name: Declare latest and push + run: docker push ${{ env.IMAGE_NAME }}:latest + + - name: Create semantic release + uses: cycjimmy/semantic-release-action@v4 + id: semantic + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Checkout new release + if: steps.semantic.outputs.new_release_published == 'true' + uses: actions/checkout@v4 + with: + ref: ${{ steps.semantic.outputs.new_release_git_tag }} + + - name: Build image for new release + if: steps.semantic.outputs.new_release_published == 'true' + uses: docker/build-push-action@v5 + with: + tags: | + ${{ env.IMAGE_NAME }}:latest + ${{ env.IMAGE_NAME }}:${{ steps.semantic.outputs.new_release_version }} + push: true + cache-from: ${{ env.IMAGE_NAME }}:latest + cache-to: type=inline + + cleanup: + runs-on: ubuntu-latest + needs: build-test-release + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Delete untagged images + run: | + python -m pip install requests + .github/workflows/delete_untagged.py ${{ secrets.GITHUB_TOKEN }} diff --git a/.releaserc.yaml b/.releaserc.yaml new file mode 100644 index 0000000..8642c0e --- /dev/null +++ b/.releaserc.yaml @@ -0,0 +1,18 @@ +# See https://semantic-release.gitbook.io/semantic-release/usage/configuration +branches: + - '+([0-9])?(.{+([0-9]),x}).x' + - 'main' + - name: 'beta' + prerelease: true +tagFormat: '${version}' # without this, the tag is prefixed with a 'v' +plugins: + - "@semantic-release/commit-analyzer" + - "@semantic-release/release-notes-generator" + - "@semantic-release/changelog" + - path: "@semantic-release/npm" + npmPublish: false + - path: "@semantic-release/git" + assets: + - "CHANGELOG.md" + - "package.json" + message: "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}" diff --git a/package.json b/package.json new file mode 100644 index 0000000..7e9ef06 --- /dev/null +++ b/package.json @@ -0,0 +1,16 @@ +{ + "name": "esi-opticks", + "version": "0.0.0", + "description": "EIC Simulation Infrastructure", + "repository": { + "type": "git", + "url": "git+https://github.com/BNLNPPS/esi-opticks.git" + }, + "keywords": [], + "author": "BNL NPPS", + "license": "MIT", + "bugs": { + "url": "https://github.com/BNLNPPS/esi-opticks/issues" + }, + "homepage": "https://github.com/BNLNPPS/esi-opticks#readme" +} From 51d0ebc05f38dae0226cbf4f86c75d45f5759625 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 25 Apr 2024 20:32:29 -0400 Subject: [PATCH 02/29] chore(release): 1.0.0-beta.1 # 1.0.0-beta.1 (2024-04-26) ### Bug Fixes * **build:** keep build cache dir ([#21](https://github.com/BNLNPPS/esi-opticks/issues/21)) ([d81672d](https://github.com/BNLNPPS/esi-opticks/commit/d81672d8f4a08532e2719851320ee9e3112cb5a5)) * **esi-shell:** avoid building code (OptiX) on shell startup ([#23](https://github.com/BNLNPPS/esi-opticks/issues/23)) ([76320cf](https://github.com/BNLNPPS/esi-opticks/commit/76320cf6e8d43e37414d0469ae8f81c950f97231)) * **esi-shell:** drop support for singularity with GPU (for now) ([#22](https://github.com/BNLNPPS/esi-opticks/issues/22)) ([4cb9d19](https://github.com/BNLNPPS/esi-opticks/commit/4cb9d19c3180ac66aab8d58a4e615cd4e0e6567e)) * **esi-shell:** improve user experience ([#20](https://github.com/BNLNPPS/esi-opticks/issues/20)) ([0a464af](https://github.com/BNLNPPS/esi-opticks/commit/0a464af1dd9d01cedb98dd50b3f3681dbe73da22)) * **esi-shell:** support only linux ([#13](https://github.com/BNLNPPS/esi-opticks/issues/13)) ([6cfb154](https://github.com/BNLNPPS/esi-opticks/commit/6cfb154d82fe252089b10ef92db3a63707c2a60b)) * patch spack default modules.yaml ([#27](https://github.com/BNLNPPS/esi-opticks/issues/27)) ([23183af](https://github.com/BNLNPPS/esi-opticks/commit/23183af24648db3fdcdf0c5a9dc94385d9aa1b9c)) * set compute capability to 5.2 compatible with Quadro M4000 ([#1](https://github.com/BNLNPPS/esi-opticks/issues/1)) ([b1d7513](https://github.com/BNLNPPS/esi-opticks/commit/b1d751357c61ac3e18a94262536ca397d1fa54e7)) * simplify build workflow, leverage login scripts ([#8](https://github.com/BNLNPPS/esi-opticks/issues/8)) ([fd974b4](https://github.com/BNLNPPS/esi-opticks/commit/fd974b4c42dbcb8c1247cd262bafbf16e4eb071b)) * use correct gdml file ([c014536](https://github.com/BNLNPPS/esi-opticks/commit/c014536e4452a815bef61a2b03bfe456a898bb7d)) ### Features * add esi-shell ([#6](https://github.com/BNLNPPS/esi-opticks/issues/6)) ([fa859aa](https://github.com/BNLNPPS/esi-opticks/commit/fa859aa91496b27fb66d891ef78a28ec90b45c50)) * setup semantic release ([ca0553c](https://github.com/BNLNPPS/esi-opticks/commit/ca0553c24acb7da072314c1b4f31bc3a84d79460)) * upgrade opticks to main@b55f15bd ([#26](https://github.com/BNLNPPS/esi-opticks/issues/26)) ([946da36](https://github.com/BNLNPPS/esi-opticks/commit/946da36cdc7fe309c63a8547ca8aeeeb0551a313)) --- CHANGELOG.md | 21 +++++++++++++++++++++ package.json | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..c118f31 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,21 @@ +# 1.0.0-beta.1 (2024-04-26) + + +### Bug Fixes + +* **build:** keep build cache dir ([#21](https://github.com/BNLNPPS/esi-opticks/issues/21)) ([d81672d](https://github.com/BNLNPPS/esi-opticks/commit/d81672d8f4a08532e2719851320ee9e3112cb5a5)) +* **esi-shell:** avoid building code (OptiX) on shell startup ([#23](https://github.com/BNLNPPS/esi-opticks/issues/23)) ([76320cf](https://github.com/BNLNPPS/esi-opticks/commit/76320cf6e8d43e37414d0469ae8f81c950f97231)) +* **esi-shell:** drop support for singularity with GPU (for now) ([#22](https://github.com/BNLNPPS/esi-opticks/issues/22)) ([4cb9d19](https://github.com/BNLNPPS/esi-opticks/commit/4cb9d19c3180ac66aab8d58a4e615cd4e0e6567e)) +* **esi-shell:** improve user experience ([#20](https://github.com/BNLNPPS/esi-opticks/issues/20)) ([0a464af](https://github.com/BNLNPPS/esi-opticks/commit/0a464af1dd9d01cedb98dd50b3f3681dbe73da22)) +* **esi-shell:** support only linux ([#13](https://github.com/BNLNPPS/esi-opticks/issues/13)) ([6cfb154](https://github.com/BNLNPPS/esi-opticks/commit/6cfb154d82fe252089b10ef92db3a63707c2a60b)) +* patch spack default modules.yaml ([#27](https://github.com/BNLNPPS/esi-opticks/issues/27)) ([23183af](https://github.com/BNLNPPS/esi-opticks/commit/23183af24648db3fdcdf0c5a9dc94385d9aa1b9c)) +* set compute capability to 5.2 compatible with Quadro M4000 ([#1](https://github.com/BNLNPPS/esi-opticks/issues/1)) ([b1d7513](https://github.com/BNLNPPS/esi-opticks/commit/b1d751357c61ac3e18a94262536ca397d1fa54e7)) +* simplify build workflow, leverage login scripts ([#8](https://github.com/BNLNPPS/esi-opticks/issues/8)) ([fd974b4](https://github.com/BNLNPPS/esi-opticks/commit/fd974b4c42dbcb8c1247cd262bafbf16e4eb071b)) +* use correct gdml file ([c014536](https://github.com/BNLNPPS/esi-opticks/commit/c014536e4452a815bef61a2b03bfe456a898bb7d)) + + +### Features + +* add esi-shell ([#6](https://github.com/BNLNPPS/esi-opticks/issues/6)) ([fa859aa](https://github.com/BNLNPPS/esi-opticks/commit/fa859aa91496b27fb66d891ef78a28ec90b45c50)) +* setup semantic release ([ca0553c](https://github.com/BNLNPPS/esi-opticks/commit/ca0553c24acb7da072314c1b4f31bc3a84d79460)) +* upgrade opticks to main@b55f15bd ([#26](https://github.com/BNLNPPS/esi-opticks/issues/26)) ([946da36](https://github.com/BNLNPPS/esi-opticks/commit/946da36cdc7fe309c63a8547ca8aeeeb0551a313)) diff --git a/package.json b/package.json index 7e9ef06..6cfa7f9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "esi-opticks", - "version": "0.0.0", + "version": "1.0.0-beta.1", "description": "EIC Simulation Infrastructure", "repository": { "type": "git", From 3a12c6b616474bb54c77b5a64a4e2572297d190b Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Fri, 26 Apr 2024 00:06:55 -0400 Subject: [PATCH 03/29] ci: update pull request workflow (#35) --- .github/workflows/build-pull-request.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index fe6cc38..95ab31e 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -11,11 +11,11 @@ concurrency: jobs: build-container: - runs-on: ubuntu-latest + runs-on: [gpu] steps: - name: Define environment variables run: | - echo REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV + echo REPOSITORY=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV echo TAG=$(echo "PR-${{ github.event.pull_request.number }}") >> $GITHUB_ENV - name: Set up docker @@ -24,8 +24,9 @@ jobs: - name: Build container uses: docker/build-push-action@v5 with: - tags: ghcr.io/${{ env.REPOSITORY }}:${{ env.TAG }} + tags: ${{ env.REPOSITORY }}:${{ env.TAG }} outputs: type=docker,dest=/tmp/esi-opticks-${{ env.TAG }}.tar + cache-from: ${{ env.IMAGE_NAME }}:latest - name: Save built image for test jobs uses: actions/upload-artifact@v4 @@ -39,7 +40,7 @@ jobs: steps: - name: Define environment variables run: | - echo REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV + echo REPOSITORY=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV echo TAG=$(echo "PR-${{ github.event.pull_request.number }}") >> $GITHUB_ENV - name: Download artifact @@ -51,4 +52,4 @@ jobs: - name: Run tests run: | docker load --input /tmp/esi-opticks-${{ env.TAG }}.tar - docker run ghcr.io/${{ env.REPOSITORY }}:${{ env.TAG }} bash -l -c opticks-info + docker run ${{ env.REPOSITORY }}:${{ env.TAG }} bash -l -c opticks-info From 19060099de607e8b2bb11f412b5230327a35198f Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Fri, 26 Apr 2024 09:45:18 -0400 Subject: [PATCH 04/29] ci: update pull request workflow (#36) --- .github/workflows/build-pull-request.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index 95ab31e..b187944 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -10,23 +10,27 @@ concurrency: cancel-in-progress: true jobs: - build-container: + build: runs-on: [gpu] steps: - name: Define environment variables run: | - echo REPOSITORY=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV + echo IMAGE_NAME=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV echo TAG=$(echo "PR-${{ github.event.pull_request.number }}") >> $GITHUB_ENV - name: Set up docker uses: docker/setup-buildx-action@v3 - - name: Build container + - name: Pull latest image as cache + run: docker pull ${{ env.IMAGE_NAME }}:latest + + - name: Build image locally uses: docker/build-push-action@v5 with: - tags: ${{ env.REPOSITORY }}:${{ env.TAG }} + tags: ${{ env.IMAGE_NAME }}:${{ env.TAG }} outputs: type=docker,dest=/tmp/esi-opticks-${{ env.TAG }}.tar cache-from: ${{ env.IMAGE_NAME }}:latest + cache-to: type=inline - name: Save built image for test jobs uses: actions/upload-artifact@v4 @@ -34,13 +38,13 @@ jobs: name: esi-opticks-${{ env.TAG }} path: /tmp/esi-opticks-${{ env.TAG }}.tar - test-container: + test: runs-on: ubuntu-latest - needs: build-container + needs: build steps: - name: Define environment variables run: | - echo REPOSITORY=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV + echo IMAGE_NAME=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV echo TAG=$(echo "PR-${{ github.event.pull_request.number }}") >> $GITHUB_ENV - name: Download artifact @@ -52,4 +56,4 @@ jobs: - name: Run tests run: | docker load --input /tmp/esi-opticks-${{ env.TAG }}.tar - docker run ${{ env.REPOSITORY }}:${{ env.TAG }} bash -l -c opticks-info + docker run ${{ env.IMAGE_NAME }}:${{ env.TAG }} bash -l -c opticks-info From 928acba495e3865e5d986e899de8993abcd63768 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Fri, 26 Apr 2024 10:05:47 -0400 Subject: [PATCH 05/29] fix(eic-shell): switch to ghcr.io registry --- esi-shell | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/esi-shell b/esi-shell index 9a1ddb7..4a8064a 100755 --- a/esi-shell +++ b/esi-shell @@ -26,7 +26,7 @@ REQUIRED_SINGULARITY_VERSION=3.7.4 REQUIRED_DOCKER_VERSION=23.0.0 # set default values -IMAGE_NAME="bnlnpps/esi-opticks" +IMAGE_NAME="ghcr.io/bnlnpps/esi-opticks" DEFAULT_VERSION="latest" VERSION=$DEFAULT_VERSION @@ -195,8 +195,7 @@ find_tool() { } # Call with a prompt string or use a default -confirm() -{ +confirm() { read -r -p "${1:-Are you sure? [y/n]} " response if [[ "${response:=$2}" =~ ^([yY][eE][sS]|[yY])+$ ]] then From 105a4ba3d2de5db92c96e451a40e5fcc50a96a4d Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Fri, 26 Apr 2024 11:01:26 -0400 Subject: [PATCH 06/29] fix: remove container after tests --- .github/workflows/build-pull-request.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index b187944..6180176 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -56,4 +56,4 @@ jobs: - name: Run tests run: | docker load --input /tmp/esi-opticks-${{ env.TAG }}.tar - docker run ${{ env.IMAGE_NAME }}:${{ env.TAG }} bash -l -c opticks-info + docker run --rm ${{ env.IMAGE_NAME }}:${{ env.TAG }} bash -l -c opticks-info diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0ce0c0e..d2a7236 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,7 +38,7 @@ jobs: cache-to: type=inline - name: Run tests - run: docker run ${{ env.IMAGE_NAME }}:latest curl --version + run: docker run --rm ${{ env.IMAGE_NAME }}:latest curl --version - name: Declare latest and push run: docker push ${{ env.IMAGE_NAME }}:latest From 941ab00a91a835bc8d490c376fa8a45c40f0b9ac Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 26 Apr 2024 13:59:31 -0400 Subject: [PATCH 07/29] chore(release): 1.0.0-beta.2 # [1.0.0-beta.2](https://github.com/BNLNPPS/esi-opticks/compare/1.0.0-beta.1...1.0.0-beta.2) (2024-04-26) ### Bug Fixes * **eic-shell:** switch to ghcr.io registry ([928acba](https://github.com/BNLNPPS/esi-opticks/commit/928acba495e3865e5d986e899de8993abcd63768)) * remove container after tests ([105a4ba](https://github.com/BNLNPPS/esi-opticks/commit/105a4ba3d2de5db92c96e451a40e5fcc50a96a4d)) --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c118f31..304914e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# [1.0.0-beta.2](https://github.com/BNLNPPS/esi-opticks/compare/1.0.0-beta.1...1.0.0-beta.2) (2024-04-26) + + +### Bug Fixes + +* **eic-shell:** switch to ghcr.io registry ([928acba](https://github.com/BNLNPPS/esi-opticks/commit/928acba495e3865e5d986e899de8993abcd63768)) +* remove container after tests ([105a4ba](https://github.com/BNLNPPS/esi-opticks/commit/105a4ba3d2de5db92c96e451a40e5fcc50a96a4d)) + # 1.0.0-beta.1 (2024-04-26) diff --git a/package.json b/package.json index 6cfa7f9..fbb485a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "esi-opticks", - "version": "1.0.0-beta.1", + "version": "1.0.0-beta.2", "description": "EIC Simulation Infrastructure", "repository": { "type": "git", From 2d6706a0ccf8bb79b55a538c1437464ab5462648 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Thu, 2 May 2024 23:54:15 -0400 Subject: [PATCH 08/29] feat: upgrade opticks (#39) --- .gitmodules | 2 +- opticks | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 35f0c14..98ade5b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "opticks"] path = opticks - url = https://github.com/simoncblyth/opticks.git + url = https://bitbucket.org/simoncblyth/opticks.git diff --git a/opticks b/opticks index b55f15b..103adb7 160000 --- a/opticks +++ b/opticks @@ -1 +1 @@ -Subproject commit b55f15bd3dc88b97fe82b48f2fbf2eccb834f391 +Subproject commit 103adb71eff2e501b070f49119fe129ac977be2f From e7e3351ee21367554cbbf267f8632aced9b7ea31 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 3 May 2024 00:00:41 -0400 Subject: [PATCH 09/29] chore(release): 1.0.0-beta.3 # [1.0.0-beta.3](https://github.com/BNLNPPS/esi-opticks/compare/1.0.0-beta.2...1.0.0-beta.3) (2024-05-03) ### Features * upgrade opticks ([#39](https://github.com/BNLNPPS/esi-opticks/issues/39)) ([2d6706a](https://github.com/BNLNPPS/esi-opticks/commit/2d6706a0ccf8bb79b55a538c1437464ab5462648)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 304914e..e1aa442 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.0.0-beta.3](https://github.com/BNLNPPS/esi-opticks/compare/1.0.0-beta.2...1.0.0-beta.3) (2024-05-03) + + +### Features + +* upgrade opticks ([#39](https://github.com/BNLNPPS/esi-opticks/issues/39)) ([2d6706a](https://github.com/BNLNPPS/esi-opticks/commit/2d6706a0ccf8bb79b55a538c1437464ab5462648)) + # [1.0.0-beta.2](https://github.com/BNLNPPS/esi-opticks/compare/1.0.0-beta.1...1.0.0-beta.2) (2024-04-26) diff --git a/package.json b/package.json index fbb485a..8509f9b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "esi-opticks", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "description": "EIC Simulation Infrastructure", "repository": { "type": "git", From 13c5502452e319292a092231da3466a135ee03bd Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Fri, 3 May 2024 13:58:37 -0400 Subject: [PATCH 10/29] chore: rename repo to esi-shell (#44) closes #43 --- .github/workflows/build-pull-request.yml | 13 +++++-------- .github/workflows/delete_untagged.py | 2 +- Dockerfile | 2 +- README.md | 10 +++++----- esi-shell | 2 +- opticks | 2 +- package.json | 8 ++++---- 7 files changed, 18 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index 6180176..4cec2f3 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -21,22 +21,19 @@ jobs: - name: Set up docker uses: docker/setup-buildx-action@v3 - - name: Pull latest image as cache - run: docker pull ${{ env.IMAGE_NAME }}:latest - - name: Build image locally uses: docker/build-push-action@v5 with: tags: ${{ env.IMAGE_NAME }}:${{ env.TAG }} - outputs: type=docker,dest=/tmp/esi-opticks-${{ env.TAG }}.tar + outputs: type=docker,dest=/tmp/esi-shell-${{ env.TAG }}.tar cache-from: ${{ env.IMAGE_NAME }}:latest cache-to: type=inline - name: Save built image for test jobs uses: actions/upload-artifact@v4 with: - name: esi-opticks-${{ env.TAG }} - path: /tmp/esi-opticks-${{ env.TAG }}.tar + name: esi-shell-${{ env.TAG }} + path: /tmp/esi-shell-${{ env.TAG }}.tar test: runs-on: ubuntu-latest @@ -50,10 +47,10 @@ jobs: - name: Download artifact uses: actions/download-artifact@v4 with: - name: esi-opticks-${{ env.TAG }} + name: esi-shell-${{ env.TAG }} path: /tmp - name: Run tests run: | - docker load --input /tmp/esi-opticks-${{ env.TAG }}.tar + docker load --input /tmp/esi-shell-${{ env.TAG }}.tar docker run --rm ${{ env.IMAGE_NAME }}:${{ env.TAG }} bash -l -c opticks-info diff --git a/.github/workflows/delete_untagged.py b/.github/workflows/delete_untagged.py index c89492e..03a61e3 100755 --- a/.github/workflows/delete_untagged.py +++ b/.github/workflows/delete_untagged.py @@ -12,7 +12,7 @@ domain = "api.github.com" org = "BNLNPPS" package_type = "container" -package_name = "esi-opticks" +package_name = "esi-shell" api_url = f"https://{domain}/orgs/{org}/packages/{package_type}/{package_name}/versions" diff --git a/Dockerfile b/Dockerfile index 48e4c25..c2c5c39 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,7 +54,7 @@ RUN rm -fr /opt/spack/share/spack/modules/$(spack arch) # create a placeholder dir for NVIDIA OptiX RUN mkdir -p /usr/local/optix -ENV ESI_DIR=/esi-opticks +ENV ESI_DIR=/esi-shell ENV OPTICKS_HOME=$ESI_DIR/opticks ENV OPTICKS_PREFIX=/usr/local/opticks ENV OPTICKS_CUDA_PREFIX=/usr/local/cuda diff --git a/README.md b/README.md index f6f539d..cffcceb 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ export OPTIX_DIR=/usr/local/optix Next, install and run `esi-shell`: ```shell -curl -Os https://bnlnpps.github.io/esi-opticks/esi-shell && chmod u+x esi-shell +curl -Os https://bnlnpps.github.io/esi-shell/esi-shell && chmod u+x esi-shell ./esi-shell ``` @@ -30,12 +30,12 @@ opticks-t ### Docker -Here are basic instructions on how to build and run the `esi-opticks` container using Docker: +Here are basic instructions on how to build and run the `esi-shell` container using Docker: ```shell -cd esi-opticks/ -docker build -t bnlnpps/esi-opticks . -docker run --rm -it bnlnpps/esi-opticks +cd esi-shell/ +docker build -t bnlnpps/esi-shell . +docker run --rm -it bnlnpps/esi-shell ``` --- diff --git a/esi-shell b/esi-shell index 4a8064a..5bc0d2c 100755 --- a/esi-shell +++ b/esi-shell @@ -26,7 +26,7 @@ REQUIRED_SINGULARITY_VERSION=3.7.4 REQUIRED_DOCKER_VERSION=23.0.0 # set default values -IMAGE_NAME="ghcr.io/bnlnpps/esi-opticks" +IMAGE_NAME="ghcr.io/bnlnpps/esi-shell" DEFAULT_VERSION="latest" VERSION=$DEFAULT_VERSION diff --git a/opticks b/opticks index 103adb7..b55f15b 160000 --- a/opticks +++ b/opticks @@ -1 +1 @@ -Subproject commit 103adb71eff2e501b070f49119fe129ac977be2f +Subproject commit b55f15bd3dc88b97fe82b48f2fbf2eccb834f391 diff --git a/package.json b/package.json index 8509f9b..ccd3eb1 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "name": "esi-opticks", + "name": "esi-shell", "version": "1.0.0-beta.3", "description": "EIC Simulation Infrastructure", "repository": { "type": "git", - "url": "git+https://github.com/BNLNPPS/esi-opticks.git" + "url": "git+https://github.com/BNLNPPS/esi-shell.git" }, "keywords": [], "author": "BNL NPPS", "license": "MIT", "bugs": { - "url": "https://github.com/BNLNPPS/esi-opticks/issues" + "url": "https://github.com/BNLNPPS/esi-shell/issues" }, - "homepage": "https://github.com/BNLNPPS/esi-opticks#readme" + "homepage": "https://github.com/BNLNPPS/esi-shell#readme" } From 8138919d14d20646535e0c80c1e1266c04e9543b Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Fri, 3 May 2024 14:58:05 -0400 Subject: [PATCH 11/29] revert: restore removed pull of latest image for cache purposes (#47) --- .github/workflows/build-pull-request.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index 4cec2f3..9740162 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -21,6 +21,9 @@ jobs: - name: Set up docker uses: docker/setup-buildx-action@v3 + - name: Pull latest image as cache + run: docker pull ${{ env.IMAGE_NAME }}:latest + - name: Build image locally uses: docker/build-push-action@v5 with: From dcbdd9299d990103f933fe504b8972f7d4e55468 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Fri, 3 May 2024 15:00:36 -0400 Subject: [PATCH 12/29] chore: re-license with Apache License Version 2.0 (#46) as requested by the BNL NPPS management Resolves #45 --- LICENSE | 222 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 201 insertions(+), 21 deletions(-) diff --git a/LICENSE b/LICENSE index 59443ac..261eeb9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,201 @@ -MIT License - -Copyright (c) 2024 BNL Nuclear and Particle Physics Software Group - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From 4338f7c51bb92b643bfbef9cb32920d517f26395 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Mon, 6 May 2024 11:30:58 -0400 Subject: [PATCH 13/29] feat: update opticks (#42) Install new dependencies libxinerama-dev libxcursor-dev libxi-dev Fixes #41 --- Dockerfile | 1 + opticks | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c2c5c39..9cc7ff3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,7 @@ RUN apt update \ libglm-dev libglfw3-dev libimgui-dev libglew-dev libglu1-mesa-dev \ libssl-dev python-is-python3 \ cuda-nvcc-11-8 libcurand-dev-11-8 \ + libxinerama-dev libxcursor-dev libxi-dev \ && apt clean \ && rm -rf /var/lib/apt/lists/* diff --git a/opticks b/opticks index b55f15b..ec115c6 160000 --- a/opticks +++ b/opticks @@ -1 +1 @@ -Subproject commit b55f15bd3dc88b97fe82b48f2fbf2eccb834f391 +Subproject commit ec115c6b8e527c90d35305cb6c049d5cb8ff707f From f8824f36bbb50028bbf16f4553f1b04766fcd92d Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 6 May 2024 13:13:22 -0400 Subject: [PATCH 14/29] chore(release): 1.0.0-beta.4 # [1.0.0-beta.4](https://github.com/BNLNPPS/esi-shell/compare/1.0.0-beta.3...1.0.0-beta.4) (2024-05-06) ### Features * update opticks ([#42](https://github.com/BNLNPPS/esi-shell/issues/42)) ([4338f7c](https://github.com/BNLNPPS/esi-shell/commit/4338f7c51bb92b643bfbef9cb32920d517f26395)), closes [#41](https://github.com/BNLNPPS/esi-shell/issues/41) ### Reverts * restore removed pull of latest image for cache purposes ([#47](https://github.com/BNLNPPS/esi-shell/issues/47)) ([8138919](https://github.com/BNLNPPS/esi-shell/commit/8138919d14d20646535e0c80c1e1266c04e9543b)) --- CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1aa442..2101b17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# [1.0.0-beta.4](https://github.com/BNLNPPS/esi-shell/compare/1.0.0-beta.3...1.0.0-beta.4) (2024-05-06) + + +### Features + +* update opticks ([#42](https://github.com/BNLNPPS/esi-shell/issues/42)) ([4338f7c](https://github.com/BNLNPPS/esi-shell/commit/4338f7c51bb92b643bfbef9cb32920d517f26395)), closes [#41](https://github.com/BNLNPPS/esi-shell/issues/41) + + +### Reverts + +* restore removed pull of latest image for cache purposes ([#47](https://github.com/BNLNPPS/esi-shell/issues/47)) ([8138919](https://github.com/BNLNPPS/esi-shell/commit/8138919d14d20646535e0c80c1e1266c04e9543b)) + # [1.0.0-beta.3](https://github.com/BNLNPPS/esi-opticks/compare/1.0.0-beta.2...1.0.0-beta.3) (2024-05-03) diff --git a/package.json b/package.json index ccd3eb1..ca58e5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "esi-shell", - "version": "1.0.0-beta.3", + "version": "1.0.0-beta.4", "description": "EIC Simulation Infrastructure", "repository": { "type": "git", From 3d2f8376bd59600a534834cbc02229870943acce Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Tue, 7 May 2024 09:35:21 -0400 Subject: [PATCH 15/29] feat: build gpu code dependent on OptiX, run opticks tests (#49) Resolves #50 --- .github/workflows/build-pull-request.yml | 17 +++++++++---- .github/workflows/release.yml | 2 +- Dockerfile | 31 ++++++++++-------------- 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index 9740162..2b327cb 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -18,15 +18,21 @@ jobs: echo IMAGE_NAME=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV echo TAG=$(echo "PR-${{ github.event.pull_request.number }}") >> $GITHUB_ENV + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: true + + - name: Copy external assets + run: cp /home/runner/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh . + - name: Set up docker uses: docker/setup-buildx-action@v3 - - name: Pull latest image as cache - run: docker pull ${{ env.IMAGE_NAME }}:latest - - name: Build image locally uses: docker/build-push-action@v5 with: + context: . tags: ${{ env.IMAGE_NAME }}:${{ env.TAG }} outputs: type=docker,dest=/tmp/esi-shell-${{ env.TAG }}.tar cache-from: ${{ env.IMAGE_NAME }}:latest @@ -39,7 +45,7 @@ jobs: path: /tmp/esi-shell-${{ env.TAG }}.tar test: - runs-on: ubuntu-latest + runs-on: [gpu] needs: build steps: - name: Define environment variables @@ -56,4 +62,5 @@ jobs: - name: Run tests run: | docker load --input /tmp/esi-shell-${{ env.TAG }}.tar - docker run --rm ${{ env.IMAGE_NAME }}:${{ env.TAG }} bash -l -c opticks-info + rm -fr /tmp/esi-shell-${{ env.TAG }}.tar + docker run --rm ${{ env.IMAGE_NAME }}:${{ env.TAG }} bash -l -c 'HOME=$ESI_DIR opticks-full-prepare && HOME=$ESI_DIR opticks-t' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d2a7236..b1f1d8e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,7 +38,7 @@ jobs: cache-to: type=inline - name: Run tests - run: docker run --rm ${{ env.IMAGE_NAME }}:latest curl --version + run: docker run --rm ${{ env.IMAGE_NAME }}:latest bash -l -c 'HOME=$ESI_DIR opticks-full-prepare && HOME=$ESI_DIR opticks-t' - name: Declare latest and push run: docker push ${{ env.IMAGE_NAME }}:latest diff --git a/Dockerfile b/Dockerfile index 9cc7ff3..bc59376 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,33 +52,28 @@ RUN echo "module use --append /opt/modules" >> /etc/profile.d/z10_load_spack_mod RUN spack module tcl loads geant4 clhep boost cmake nlohmann-json >> /etc/profile.d/z10_load_spack_modules.sh RUN rm -fr /opt/spack/share/spack/modules/$(spack arch) -# create a placeholder dir for NVIDIA OptiX -RUN mkdir -p /usr/local/optix - -ENV ESI_DIR=/esi-shell -ENV OPTICKS_HOME=$ESI_DIR/opticks +ENV ESI_DIR=/esi +ENV OPTIX_DIR=/usr/local/optix +ENV OPTICKS_HOME=${ESI_DIR}/opticks ENV OPTICKS_PREFIX=/usr/local/opticks ENV OPTICKS_CUDA_PREFIX=/usr/local/cuda -ENV OPTICKS_OPTIX_PREFIX=/usr/local/optix +ENV OPTICKS_OPTIX_PREFIX=${OPTIX_DIR} ENV OPTICKS_COMPUTE_CAPABILITY=52 ENV PYTHONPATH=${OPTICKS_HOME} +ENV LD_LIBRARY_PATH=${OPTICKS_PREFIX}/lib/:$LD_LIBRARY_PATH -COPY epic $ESI_DIR/epic -COPY opticks $ESI_DIR/opticks -COPY .opticks $ESI_DIR/.opticks +WORKDIR $ESI_DIR -WORKDIR $OPTICKS_HOME +COPY epic epic +COPY opticks opticks +COPY .opticks .opticks +COPY NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh . -RUN mkdir -p $ESI_DIR COPY <<-"EOF" /etc/profile.d/z20_opticks.sh source $OPTICKS_HOME/opticks.bash opticks- EOF -RUN opticks-full-externals -RUN < Date: Tue, 7 May 2024 10:59:14 -0400 Subject: [PATCH 16/29] fix: pull external asset in release workflow (#51) --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b1f1d8e..207abf2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,9 @@ jobs: with: fetch-depth: 0 # Important for Semantic Release to analyze all commits + - name: Copy external assets + run: cp /home/runner/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh . + - name: Set up docker buildx uses: docker/setup-buildx-action@v3 From a5668351008468faab16509c6f800eff7955a0c5 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Tue, 7 May 2024 11:31:22 -0400 Subject: [PATCH 17/29] Revert "fix: pull external asset in release workflow (#51)" This reverts commit c67557d56a0c0c223e187b0983734186c76e2b70. --- .github/workflows/release.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 207abf2..b1f1d8e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,9 +18,6 @@ jobs: with: fetch-depth: 0 # Important for Semantic Release to analyze all commits - - name: Copy external assets - run: cp /home/runner/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh . - - name: Set up docker buildx uses: docker/setup-buildx-action@v3 From a301bd290c43476ef5fa674ce7cc52f326fa29e9 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Tue, 7 May 2024 11:31:30 -0400 Subject: [PATCH 18/29] Revert "feat: build gpu code dependent on OptiX, run opticks tests (#49)" This reverts commit 3d2f8376bd59600a534834cbc02229870943acce. --- .github/workflows/build-pull-request.yml | 17 ++++--------- .github/workflows/release.yml | 2 +- Dockerfile | 31 ++++++++++++++---------- 3 files changed, 24 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index 2b327cb..9740162 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -18,21 +18,15 @@ jobs: echo IMAGE_NAME=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV echo TAG=$(echo "PR-${{ github.event.pull_request.number }}") >> $GITHUB_ENV - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: true - - - name: Copy external assets - run: cp /home/runner/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh . - - name: Set up docker uses: docker/setup-buildx-action@v3 + - name: Pull latest image as cache + run: docker pull ${{ env.IMAGE_NAME }}:latest + - name: Build image locally uses: docker/build-push-action@v5 with: - context: . tags: ${{ env.IMAGE_NAME }}:${{ env.TAG }} outputs: type=docker,dest=/tmp/esi-shell-${{ env.TAG }}.tar cache-from: ${{ env.IMAGE_NAME }}:latest @@ -45,7 +39,7 @@ jobs: path: /tmp/esi-shell-${{ env.TAG }}.tar test: - runs-on: [gpu] + runs-on: ubuntu-latest needs: build steps: - name: Define environment variables @@ -62,5 +56,4 @@ jobs: - name: Run tests run: | docker load --input /tmp/esi-shell-${{ env.TAG }}.tar - rm -fr /tmp/esi-shell-${{ env.TAG }}.tar - docker run --rm ${{ env.IMAGE_NAME }}:${{ env.TAG }} bash -l -c 'HOME=$ESI_DIR opticks-full-prepare && HOME=$ESI_DIR opticks-t' + docker run --rm ${{ env.IMAGE_NAME }}:${{ env.TAG }} bash -l -c opticks-info diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b1f1d8e..d2a7236 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,7 +38,7 @@ jobs: cache-to: type=inline - name: Run tests - run: docker run --rm ${{ env.IMAGE_NAME }}:latest bash -l -c 'HOME=$ESI_DIR opticks-full-prepare && HOME=$ESI_DIR opticks-t' + run: docker run --rm ${{ env.IMAGE_NAME }}:latest curl --version - name: Declare latest and push run: docker push ${{ env.IMAGE_NAME }}:latest diff --git a/Dockerfile b/Dockerfile index bc59376..9cc7ff3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,28 +52,33 @@ RUN echo "module use --append /opt/modules" >> /etc/profile.d/z10_load_spack_mod RUN spack module tcl loads geant4 clhep boost cmake nlohmann-json >> /etc/profile.d/z10_load_spack_modules.sh RUN rm -fr /opt/spack/share/spack/modules/$(spack arch) -ENV ESI_DIR=/esi -ENV OPTIX_DIR=/usr/local/optix -ENV OPTICKS_HOME=${ESI_DIR}/opticks +# create a placeholder dir for NVIDIA OptiX +RUN mkdir -p /usr/local/optix + +ENV ESI_DIR=/esi-shell +ENV OPTICKS_HOME=$ESI_DIR/opticks ENV OPTICKS_PREFIX=/usr/local/opticks ENV OPTICKS_CUDA_PREFIX=/usr/local/cuda -ENV OPTICKS_OPTIX_PREFIX=${OPTIX_DIR} +ENV OPTICKS_OPTIX_PREFIX=/usr/local/optix ENV OPTICKS_COMPUTE_CAPABILITY=52 ENV PYTHONPATH=${OPTICKS_HOME} -ENV LD_LIBRARY_PATH=${OPTICKS_PREFIX}/lib/:$LD_LIBRARY_PATH -WORKDIR $ESI_DIR +COPY epic $ESI_DIR/epic +COPY opticks $ESI_DIR/opticks +COPY .opticks $ESI_DIR/.opticks -COPY epic epic -COPY opticks opticks -COPY .opticks .opticks -COPY NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh . +WORKDIR $OPTICKS_HOME +RUN mkdir -p $ESI_DIR COPY <<-"EOF" /etc/profile.d/z20_opticks.sh source $OPTICKS_HOME/opticks.bash opticks- EOF -RUN mkdir -p $OPTIX_DIR && ./NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh --skip-license --prefix=$OPTIX_DIR -RUN HOME=$ESI_DIR opticks-full -RUN rm -fr $OPTIX_DIR/* $ESI_DIR/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh +RUN opticks-full-externals +RUN < Date: Tue, 7 May 2024 11:57:33 -0400 Subject: [PATCH 19/29] chore(release): 1.0.0-beta.5 # [1.0.0-beta.5](https://github.com/BNLNPPS/esi-shell/compare/1.0.0-beta.4...1.0.0-beta.5) (2024-05-07) ### Reverts * Revert "feat: build gpu code dependent on OptiX, run opticks tests (#49)" ([a301bd2](https://github.com/BNLNPPS/esi-shell/commit/a301bd290c43476ef5fa674ce7cc52f326fa29e9)), closes [#49](https://github.com/BNLNPPS/esi-shell/issues/49) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2101b17..5d48a26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.0.0-beta.5](https://github.com/BNLNPPS/esi-shell/compare/1.0.0-beta.4...1.0.0-beta.5) (2024-05-07) + + +### Reverts + +* Revert "feat: build gpu code dependent on OptiX, run opticks tests (#49)" ([a301bd2](https://github.com/BNLNPPS/esi-shell/commit/a301bd290c43476ef5fa674ce7cc52f326fa29e9)), closes [#49](https://github.com/BNLNPPS/esi-shell/issues/49) + # [1.0.0-beta.4](https://github.com/BNLNPPS/esi-shell/compare/1.0.0-beta.3...1.0.0-beta.4) (2024-05-06) diff --git a/package.json b/package.json index ca58e5f..f6f2cf1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "esi-shell", - "version": "1.0.0-beta.4", + "version": "1.0.0-beta.5", "description": "EIC Simulation Infrastructure", "repository": { "type": "git", From 5f58b7be7d1893ba7247de5b95f43a7349aa4cf8 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Tue, 7 May 2024 14:56:22 -0400 Subject: [PATCH 20/29] feat: build gpu code dependent on OptiX, run opticks tests (#49) (#53) Resolves #50 --- .github/workflows/build-pull-request.yml | 17 +++++++++---- .github/workflows/release.yml | 11 ++++++++- .releaserc.yaml | 2 ++ Dockerfile | 31 ++++++++++-------------- 4 files changed, 37 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index 9740162..2b327cb 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -18,15 +18,21 @@ jobs: echo IMAGE_NAME=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV echo TAG=$(echo "PR-${{ github.event.pull_request.number }}") >> $GITHUB_ENV + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: true + + - name: Copy external assets + run: cp /home/runner/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh . + - name: Set up docker uses: docker/setup-buildx-action@v3 - - name: Pull latest image as cache - run: docker pull ${{ env.IMAGE_NAME }}:latest - - name: Build image locally uses: docker/build-push-action@v5 with: + context: . tags: ${{ env.IMAGE_NAME }}:${{ env.TAG }} outputs: type=docker,dest=/tmp/esi-shell-${{ env.TAG }}.tar cache-from: ${{ env.IMAGE_NAME }}:latest @@ -39,7 +45,7 @@ jobs: path: /tmp/esi-shell-${{ env.TAG }}.tar test: - runs-on: ubuntu-latest + runs-on: [gpu] needs: build steps: - name: Define environment variables @@ -56,4 +62,5 @@ jobs: - name: Run tests run: | docker load --input /tmp/esi-shell-${{ env.TAG }}.tar - docker run --rm ${{ env.IMAGE_NAME }}:${{ env.TAG }} bash -l -c opticks-info + rm -fr /tmp/esi-shell-${{ env.TAG }}.tar + docker run --rm ${{ env.IMAGE_NAME }}:${{ env.TAG }} bash -l -c 'HOME=$ESI_DIR opticks-full-prepare && HOME=$ESI_DIR opticks-t' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d2a7236..480f539 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,7 @@ on: branches: - main - beta + - betatest jobs: build-test-release: @@ -18,6 +19,9 @@ jobs: with: fetch-depth: 0 # Important for Semantic Release to analyze all commits + - name: Copy external assets + run: cp /home/runner/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh . + - name: Set up docker buildx uses: docker/setup-buildx-action@v3 @@ -31,6 +35,7 @@ jobs: - name: Build image locally uses: docker/build-push-action@v5 with: + context: . tags: ${{ env.IMAGE_NAME }}:latest pull: true load: true @@ -38,7 +43,7 @@ jobs: cache-to: type=inline - name: Run tests - run: docker run --rm ${{ env.IMAGE_NAME }}:latest curl --version + run: docker run --rm ${{ env.IMAGE_NAME }}:latest bash -l -c 'HOME=$ESI_DIR opticks-full-prepare && HOME=$ESI_DIR opticks-t' - name: Declare latest and push run: docker push ${{ env.IMAGE_NAME }}:latest @@ -55,10 +60,14 @@ jobs: with: ref: ${{ steps.semantic.outputs.new_release_git_tag }} + - name: Copy external assets + run: cp /home/runner/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh . + - name: Build image for new release if: steps.semantic.outputs.new_release_published == 'true' uses: docker/build-push-action@v5 with: + context: . tags: | ${{ env.IMAGE_NAME }}:latest ${{ env.IMAGE_NAME }}:${{ steps.semantic.outputs.new_release_version }} diff --git a/.releaserc.yaml b/.releaserc.yaml index 8642c0e..fc61919 100644 --- a/.releaserc.yaml +++ b/.releaserc.yaml @@ -4,6 +4,8 @@ branches: - 'main' - name: 'beta' prerelease: true + - name: 'betatest' + prerelease: true tagFormat: '${version}' # without this, the tag is prefixed with a 'v' plugins: - "@semantic-release/commit-analyzer" diff --git a/Dockerfile b/Dockerfile index 9cc7ff3..bc59376 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,33 +52,28 @@ RUN echo "module use --append /opt/modules" >> /etc/profile.d/z10_load_spack_mod RUN spack module tcl loads geant4 clhep boost cmake nlohmann-json >> /etc/profile.d/z10_load_spack_modules.sh RUN rm -fr /opt/spack/share/spack/modules/$(spack arch) -# create a placeholder dir for NVIDIA OptiX -RUN mkdir -p /usr/local/optix - -ENV ESI_DIR=/esi-shell -ENV OPTICKS_HOME=$ESI_DIR/opticks +ENV ESI_DIR=/esi +ENV OPTIX_DIR=/usr/local/optix +ENV OPTICKS_HOME=${ESI_DIR}/opticks ENV OPTICKS_PREFIX=/usr/local/opticks ENV OPTICKS_CUDA_PREFIX=/usr/local/cuda -ENV OPTICKS_OPTIX_PREFIX=/usr/local/optix +ENV OPTICKS_OPTIX_PREFIX=${OPTIX_DIR} ENV OPTICKS_COMPUTE_CAPABILITY=52 ENV PYTHONPATH=${OPTICKS_HOME} +ENV LD_LIBRARY_PATH=${OPTICKS_PREFIX}/lib/:$LD_LIBRARY_PATH -COPY epic $ESI_DIR/epic -COPY opticks $ESI_DIR/opticks -COPY .opticks $ESI_DIR/.opticks +WORKDIR $ESI_DIR -WORKDIR $OPTICKS_HOME +COPY epic epic +COPY opticks opticks +COPY .opticks .opticks +COPY NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh . -RUN mkdir -p $ESI_DIR COPY <<-"EOF" /etc/profile.d/z20_opticks.sh source $OPTICKS_HOME/opticks.bash opticks- EOF -RUN opticks-full-externals -RUN < Date: Tue, 7 May 2024 15:01:28 -0400 Subject: [PATCH 21/29] chore(release): 1.0.0-beta.6 # [1.0.0-beta.6](https://github.com/BNLNPPS/esi-shell/compare/1.0.0-beta.5...1.0.0-beta.6) (2024-05-07) ### Features * build gpu code dependent on OptiX, run opticks tests ([#49](https://github.com/BNLNPPS/esi-shell/issues/49)) ([#53](https://github.com/BNLNPPS/esi-shell/issues/53)) ([5f58b7b](https://github.com/BNLNPPS/esi-shell/commit/5f58b7be7d1893ba7247de5b95f43a7349aa4cf8)), closes [#50](https://github.com/BNLNPPS/esi-shell/issues/50) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d48a26..67ae88d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.0.0-beta.6](https://github.com/BNLNPPS/esi-shell/compare/1.0.0-beta.5...1.0.0-beta.6) (2024-05-07) + + +### Features + +* build gpu code dependent on OptiX, run opticks tests ([#49](https://github.com/BNLNPPS/esi-shell/issues/49)) ([#53](https://github.com/BNLNPPS/esi-shell/issues/53)) ([5f58b7b](https://github.com/BNLNPPS/esi-shell/commit/5f58b7be7d1893ba7247de5b95f43a7349aa4cf8)), closes [#50](https://github.com/BNLNPPS/esi-shell/issues/50) + # [1.0.0-beta.5](https://github.com/BNLNPPS/esi-shell/compare/1.0.0-beta.4...1.0.0-beta.5) (2024-05-07) diff --git a/package.json b/package.json index f6f2cf1..898c5c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "esi-shell", - "version": "1.0.0-beta.5", + "version": "1.0.0-beta.6", "description": "EIC Simulation Infrastructure", "repository": { "type": "git", From 55968d3a2c541727eb8019cf99b69decad771dbf Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Tue, 7 May 2024 17:31:34 -0400 Subject: [PATCH 22/29] ci: combine build and test jobs in build-pull-request workflow (#54) It does not seem necessary to save the PR image as an artifact at this point --- .github/workflows/build-pull-request.yml | 29 +++--------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index 2b327cb..4046e23 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -10,7 +10,7 @@ concurrency: cancel-in-progress: true jobs: - build: + build-test: runs-on: [gpu] steps: - name: Define environment variables @@ -29,38 +29,15 @@ jobs: - name: Set up docker uses: docker/setup-buildx-action@v3 - - name: Build image locally + - name: Build and export to Docker uses: docker/build-push-action@v5 with: context: . tags: ${{ env.IMAGE_NAME }}:${{ env.TAG }} - outputs: type=docker,dest=/tmp/esi-shell-${{ env.TAG }}.tar + load: true cache-from: ${{ env.IMAGE_NAME }}:latest cache-to: type=inline - - name: Save built image for test jobs - uses: actions/upload-artifact@v4 - with: - name: esi-shell-${{ env.TAG }} - path: /tmp/esi-shell-${{ env.TAG }}.tar - - test: - runs-on: [gpu] - needs: build - steps: - - name: Define environment variables - run: | - echo IMAGE_NAME=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV - echo TAG=$(echo "PR-${{ github.event.pull_request.number }}") >> $GITHUB_ENV - - - name: Download artifact - uses: actions/download-artifact@v4 - with: - name: esi-shell-${{ env.TAG }} - path: /tmp - - name: Run tests run: | - docker load --input /tmp/esi-shell-${{ env.TAG }}.tar - rm -fr /tmp/esi-shell-${{ env.TAG }}.tar docker run --rm ${{ env.IMAGE_NAME }}:${{ env.TAG }} bash -l -c 'HOME=$ESI_DIR opticks-full-prepare && HOME=$ESI_DIR opticks-t' From 71e70c8f1795130ad072eed9859ea4d69a6ae450 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Tue, 7 May 2024 17:40:13 -0400 Subject: [PATCH 23/29] ci: use proper token to cleanup untagged packages --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 480f539..027d49d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,4 +90,4 @@ jobs: - name: Delete untagged images run: | python -m pip install requests - .github/workflows/delete_untagged.py ${{ secrets.GITHUB_TOKEN }} + .github/workflows/delete_untagged.py ${{ secrets.BNLNPPS_ESI_OPTICKS_PACKAGES_TOKEN }} From 20c6f4b11c50cba8cda6a5fd873be0a74482e5d3 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Wed, 8 May 2024 16:10:38 -0400 Subject: [PATCH 24/29] test: add wrapper around opticks tests (#57) --- .github/workflows/build-pull-request.yml | 2 +- .github/workflows/release.yml | 2 +- Dockerfile | 1 + tests/test_opticks.sh | 6 ++++++ 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100755 tests/test_opticks.sh diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index 4046e23..9e77a2f 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -40,4 +40,4 @@ jobs: - name: Run tests run: | - docker run --rm ${{ env.IMAGE_NAME }}:${{ env.TAG }} bash -l -c 'HOME=$ESI_DIR opticks-full-prepare && HOME=$ESI_DIR opticks-t' + docker run --rm ${{ env.IMAGE_NAME }}:${{ env.TAG }} tests/test_opticks.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 027d49d..893b0cc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: cache-to: type=inline - name: Run tests - run: docker run --rm ${{ env.IMAGE_NAME }}:latest bash -l -c 'HOME=$ESI_DIR opticks-full-prepare && HOME=$ESI_DIR opticks-t' + run: docker run --rm ${{ env.IMAGE_NAME }}:latest tests/test_opticks.sh - name: Declare latest and push run: docker push ${{ env.IMAGE_NAME }}:latest diff --git a/Dockerfile b/Dockerfile index bc59376..ccb13c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,6 +67,7 @@ WORKDIR $ESI_DIR COPY epic epic COPY opticks opticks COPY .opticks .opticks +COPY tests tests COPY NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64.sh . COPY <<-"EOF" /etc/profile.d/z20_opticks.sh diff --git a/tests/test_opticks.sh b/tests/test_opticks.sh new file mode 100755 index 0000000..3e7fc5d --- /dev/null +++ b/tests/test_opticks.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env -S bash -l + +HOME=${HOME/\/root/$ESI_DIR} + +opticks-full-prepare +opticks-t From 752302ca9b451d8b69ea3c49dce7887cd0eb94ee Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Thu, 9 May 2024 09:21:13 -0400 Subject: [PATCH 25/29] Update readme instructions for running with docker (#56) Provide a more granular description of setup steps need to run Opticks in esi-shell with docker. --- README.md | 43 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cffcceb..8780ada 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,44 @@ opticks-t ### Docker -Here are basic instructions on how to build and run the `esi-shell` container using Docker: +* Create a personal access token with privilege to download packages from github package registry +Screenshot 2024-05-07 at 9 36 36 PM -```shell -cd esi-shell/ -docker build -t bnlnpps/esi-shell . -docker run --rm -it bnlnpps/esi-shell -``` +* Login to github package registry with your token. + + ```shell + export TOKEN= + echo $TOKEN | docker login ghcr.io -u USERNAME --password-stdin + ``` +* Pull the tagged release you want to run from the registry. For example: + + ```shell + docker pull ghcr.io/bnlnpps/esi-shell:latest + ``` + The list of all tagged releases can be found [here](https://github.com/BNLNPPS/esi-shell/pkgs/container/esi-shell). + +* Run the tagged release with the local nvidia optix installation + + ```shell + docker run --rm -it --gpus all -v /usr/local/optix:/usr/local/optix -e HOME=/esi-shell ghcr.io/bnlnpps/esi-shell:latest + ``` + + Explanation of the docker command: + ``` + docker run: Instructs Docker to run a container. + --rm: Ensures that the container is removed after it stops running. + -it: Make the container interactive. + --gpus all: Specifies that all available GPUs should be accessible within the container. + -v /usr/local/optix:/usr/local/optix: Mounts the host directory /usr/local/optix into the container at the same location. + -e HOME=/esi-shell: Sets the environment variable HOME to /esi-shell within the container. + ghcr.io/bnlnpps/esi-shell:1.0.0-beta.4: Image and tag in github package registry. + ``` +* Build the code and run unit tests + + ```shell + opticks-full + opticks-t + ``` --- From 7a0e1f9c8b0bde85f20b45a82cad8e0408f1ed30 Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Thu, 9 May 2024 12:30:18 -0400 Subject: [PATCH 26/29] Add vim text editor to the container (#60) Add a light weight text editor to the container. Just chose vim because that's what I am used to. Resolves #59 --------- Co-authored-by: Dmitri Smirnov --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index ccb13c4..317b3d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ RUN apt update \ libssl-dev python-is-python3 \ cuda-nvcc-11-8 libcurand-dev-11-8 \ libxinerama-dev libxcursor-dev libxi-dev \ + nano vim \ && apt clean \ && rm -rf /var/lib/apt/lists/* From e483587049dcd83c28dcd23a7eccb90cc31e0abf Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Thu, 9 May 2024 22:41:12 -0400 Subject: [PATCH 27/29] ci: use appropriate token (#61) use the token that can delete untagged images --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 893b0cc..1e4d3e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,4 +90,4 @@ jobs: - name: Delete untagged images run: | python -m pip install requests - .github/workflows/delete_untagged.py ${{ secrets.BNLNPPS_ESI_OPTICKS_PACKAGES_TOKEN }} + .github/workflows/delete_untagged.py ${{ secrets.BNLNPPS_ESI_SHELL_PACKAGES_TOKEN }} From 33f5b0614ecd4ce3918492c22a087aa395767932 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Fri, 10 May 2024 10:34:45 -0400 Subject: [PATCH 28/29] fix: always pull updated image from registry (#62) --- esi-shell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esi-shell b/esi-shell index 5bc0d2c..987d0c4 100755 --- a/esi-shell +++ b/esi-shell @@ -256,7 +256,7 @@ ohai "Using esi-shell image: ${IMG}" if [[ -n "${USABLE_DOCKER-}" ]] then - cmd="docker run --rm -dit ${DOCKER_GPU-} ${DOCKER_PLATFORM-} ${DOCKER_BIND_VOLUME-} -e OPTICKS_OPTIX_PREFIX=$OPTIX_DIR -e HOME=$WORKDIR -w=$WORKDIR $IMG" + cmd="docker run --rm -dit --pull=always ${DOCKER_GPU-} ${DOCKER_PLATFORM-} ${DOCKER_BIND_VOLUME-} -e OPTICKS_OPTIX_PREFIX=$OPTIX_DIR -e HOME=$WORKDIR -w=$WORKDIR $IMG" CONTAINER_ID=$(exec $cmd) if [ $? -ne 0 ] From 9d1789ab865d98b8a5168642e61f456a3a04ae1a Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 10 May 2024 10:39:58 -0400 Subject: [PATCH 29/29] chore(release): 1.0.0-beta.7 # [1.0.0-beta.7](https://github.com/BNLNPPS/esi-shell/compare/1.0.0-beta.6...1.0.0-beta.7) (2024-05-10) ### Bug Fixes * always pull updated image from registry ([#62](https://github.com/BNLNPPS/esi-shell/issues/62)) ([33f5b06](https://github.com/BNLNPPS/esi-shell/commit/33f5b0614ecd4ce3918492c22a087aa395767932)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67ae88d..48c607a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.0.0-beta.7](https://github.com/BNLNPPS/esi-shell/compare/1.0.0-beta.6...1.0.0-beta.7) (2024-05-10) + + +### Bug Fixes + +* always pull updated image from registry ([#62](https://github.com/BNLNPPS/esi-shell/issues/62)) ([33f5b06](https://github.com/BNLNPPS/esi-shell/commit/33f5b0614ecd4ce3918492c22a087aa395767932)) + # [1.0.0-beta.6](https://github.com/BNLNPPS/esi-shell/compare/1.0.0-beta.5...1.0.0-beta.6) (2024-05-07) diff --git a/package.json b/package.json index 898c5c0..99ce839 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "esi-shell", - "version": "1.0.0-beta.6", + "version": "1.0.0-beta.7", "description": "EIC Simulation Infrastructure", "repository": { "type": "git",