-
Notifications
You must be signed in to change notification settings - Fork 3
#283: Added GPU Support for run-db-test
#287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
cfb786e
#283: Added GPU Support for `run-db-test`
tomuben b6b8620
Run `nox -s project:fix` and fixed `run-db-test`
tomuben 458a047
Manually install poetry on GPU runner
tomuben a4e5ab3
Reordered arguments in click method run-db-test
tomuben 0987c79
Get GPU Tests over nox task and splitted up integration tests
tomuben b42ebf8
Removed main.yml
tomuben be4f046
Fixed GPU Test
tomuben 3ada153
Improved tests in test_container
tomuben be4ad14
Fixed test in test_container
tomuben 62f8fdf
Replaced boolean parameter `gpu_enabled` with `accelerator`
tomuben ff68a10
Fixes from review
tomuben File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: GPU Tests | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
|
||
prep-testbed-gpu: | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/[email protected] | ||
|
||
- id: set-matrix | ||
run: | | ||
ALL_TESTS=`poetry run -- nox -s integration-test-list -- --test-set gpu-only` | ||
echo "matrix=$ALL_TESTS" >> "$GITHUB_OUTPUT" | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
|
||
test-gpu: | ||
needs: prep-testbed-gpu | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python_version: | ||
- "3.10" | ||
test-path: ${{fromJson(needs.prep-testbed-gpu.outputs.matrix)}} | ||
runs-on: | ||
labels: int-linux-x64-4core-gpu-t4-ubuntu24.04-1 | ||
name: GPU Test | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
#Cannot use exasol/python-toolbox/.github/actions/python-environment here | ||
#because pipx is not installed on int-linux-x64-4core-gpu-t4-ubuntu24.04-1 | ||
- name: Setup Python ('${{ matrix.python_version }}') | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '${{ matrix.python_version }}' | ||
|
||
- name: Install pipx and poetry | ||
run: | | ||
pip install pipx | ||
pipx install poetry=="2.1.2" | ||
echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
|
||
- name: Setup Poetry | ||
run: | | ||
poetry env use python3 | ||
poetry install | ||
|
||
- name: Allow unprivileged user namespaces | ||
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | ||
|
||
- name: Run ${{ matrix.test-path.name }} | ||
run: poetry run -- python "${{ matrix.test-path.path }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Integration Tests | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
DOCKER_USERNAME: | ||
required: true | ||
DOCKER_PASSWORD: | ||
required: true | ||
jobs: | ||
|
||
prep-testbed: | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/[email protected] | ||
|
||
- id: set-matrix | ||
run: | | ||
ALL_TESTS=`poetry run -- nox -s integration-test-list -- --test-set default` | ||
echo "matrix=$ALL_TESTS" >> "$GITHUB_OUTPUT" | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
|
||
test-all: | ||
needs: prep-testbed | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python_version: | ||
- "3.10" | ||
test-path: ${{fromJson(needs.prep-testbed.outputs.matrix)}} | ||
runs-on: ubuntu-24.04 | ||
name: ${{ matrix.test-path.name }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/[email protected] | ||
with: | ||
python-version: '${{ matrix.python_version }}' | ||
|
||
- name: Allow unprivileged user namespaces | ||
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | ||
|
||
- name: Run test ${{ matrix.test-path.name }} | ||
run: poetry run -- python ${{ matrix.test-path.path }} | ||
env: # Set the secret as an input | ||
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWD: ${{ secrets.DOCKER_PASSWORD }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,46 +27,15 @@ jobs: | |
- name: Tests | ||
run: echo "Slow tests approved" | ||
|
||
prep-testbed: | ||
needs: slow-tests-approval | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/[email protected] | ||
|
||
- id: set-matrix | ||
run: | | ||
ALL_TESTS=`poetry run -- nox -s integration-test-list` | ||
echo "matrix=$ALL_TESTS" >> "$GITHUB_OUTPUT" | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
|
||
test-all: | ||
needs: prep-testbed | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python_version: | ||
- "3.10" | ||
test-path: ${{fromJson(needs.prep-testbed.outputs.matrix)}} | ||
runs-on: ubuntu-24.04 | ||
name: ${{ matrix.test-path.name }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/[email protected] | ||
with: | ||
python-version: '${{ matrix.python_version }}' | ||
|
||
- name: Allow unprivileged user namespaces | ||
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | ||
integration-tests: | ||
needs: slow-tests-approval | ||
name: Integrations | ||
uses: ./.github/workflows/integration-tests.yml | ||
secrets: inherit | ||
|
||
- name: Run test ${{ matrix.test-path.name }} | ||
run: poetry run -- python ${{ matrix.test-path.path }} | ||
env: # Set the secret as an input | ||
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWD: ${{ secrets.DOCKER_PASSWORD }} | ||
gpu-tests: | ||
needs: slow-tests-approval | ||
name: Integrations | ||
uses: ./.github/workflows/gpu-tests.yml | ||
secrets: inherit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from enum import Enum | ||
from typing import List | ||
|
||
|
||
class Accelerator(Enum): | ||
""" | ||
This enum serves as a definition of values for possible accelerators for `run-db-tests`. | ||
""" | ||
|
||
NONE = "none" | ||
NVIDA = "nvidia" | ||
|
||
|
||
def defaultAccelerator() -> Accelerator: | ||
return Accelerator.NONE | ||
|
||
|
||
def acceleratorValues() -> List[str]: | ||
return [a.value for a in Accelerator] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.