Skip to content

Commit

Permalink
#12775: Cleanup docker run action
Browse files Browse the repository at this point in the history
   - Remove unnecessary arch parameter of the docker run action
   - Add a parameter to installing the wheel
   - Remove LD_LIBRARY env variable since it is not used in the wheel environments
   - Remove Github username since it is accessible inside of the custom Action
  • Loading branch information
dimitri-tenstorrent committed Sep 17, 2024
1 parent 57a9175 commit 5a0ad02
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 21 deletions.
13 changes: 10 additions & 3 deletions .github/actions/docker-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ inputs:
description: 'Docker image to run commands in'
required: false
default: tt-metalium/ubuntu-20.04-amd64
docker_image_arch:
description: 'Is this a wormhole.b0, grayskull, or blackhole image'
required: true
docker_username:
description: docker login username
required: true
default: ${{ github.actor }}
docker_password:
description: docker login password
required: true
Expand All @@ -28,6 +26,11 @@ inputs:
default: |
-v /dev/hugepages-1G:/dev/hugepages-1G
--device /dev/tenstorrent
install_wheel:
description: "Install the wheel that contains all of the Python environment. The artifact needs to be present."
type: boolean
required: false
default: false
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -65,4 +68,8 @@ runs:
cp -r /github_workspace/* /usr/app/
cd /usr/app/
rm -rf tt_metal tt_eager
if [ ${{ inputs.install_wheel }} ]; then
WHEEL_FILENAME=$(ls -1 *.whl)
pip3 install --user $WHEEL_FILENAME
fi
${{ inputs.run_args }}
7 changes: 1 addition & 6 deletions .github/workflows/fast-dispatch-build-and-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ jobs:
name: ${{ matrix.test-group.name }} ${{ inputs.arch }} ${{ inputs.runner-label }}
env:
LOGURU_LEVEL: INFO
# may not need this
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib
runs-on:
- ${{ inputs.runner-label }}
- cloud-virtual-machine
Expand All @@ -72,12 +70,9 @@ jobs:
timeout-minutes: ${{ inputs.timeout }}
uses: ./.github/actions/docker-run
with:
docker_username: ${{ github.actor }}
install_wheel: true
docker_password: ${{ secrets.GITHUB_TOKEN }}
docker_image_arch: ${{ inputs.arch }}
run_args: |
WHEEL_FILENAME=$(ls -1 *.whl)
pip3 install --user $WHEEL_FILENAME
${{ matrix.test-group.cmd }}
- uses: ./.github/actions/slack-report
if: ${{ failure() }}
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/models-post-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ jobs:
name: ${{ matrix.test-group.name }} ${{ inputs.arch }} ${{ inputs.runner-label }}
env:
LOGURU_LEVEL: INFO
# may not need this
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib
runs-on:
- ${{ inputs.runner-label }}
- in-service
Expand All @@ -64,12 +62,9 @@ jobs:
timeout-minutes: ${{ inputs.timeout }}
uses: ./.github/actions/docker-run
with:
docker_username: ${{ github.actor }}
install_wheel: true
docker_password: ${{ secrets.GITHUB_TOKEN }}
docker_image_arch: ${{ inputs.arch }}
run_args: |
WHEEL_FILENAME=$(ls -1 *.whl)
pip3 install --user $WHEEL_FILENAME
source tests/scripts/run_python_model_tests.sh && run_python_model_tests_${{ inputs.arch }}
- uses: ./.github/actions/slack-report
if: ${{ failure() }}
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/ttnn-post-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ jobs:
name: ${{ matrix.test-group.name }} ${{ inputs.arch }} ${{ inputs.runner-label }}
env:
LOGURU_LEVEL: INFO
# may not need this
LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib
runs-on:
- ${{ inputs.runner-label }}
- "in-service"
Expand All @@ -82,12 +80,9 @@ jobs:
timeout-minutes: ${{ inputs.timeout }}
uses: ./.github/actions/docker-run
with:
docker_username: ${{ github.actor }}
install_wheel: true
docker_password: ${{ secrets.GITHUB_TOKEN }}
docker_image_arch: ${{ inputs.arch }}
run_args: |
WHEEL_FILENAME=$(ls -1 *.whl)
pip3 install --user $WHEEL_FILENAME
${{ matrix.test-group.cmd }}
- uses: ./.github/actions/slack-report
if: ${{ failure() }}
Expand Down

0 comments on commit 5a0ad02

Please sign in to comment.