Skip to content
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

#12891: Copy generated artifacts out of docker container so that we can upload test results #12959

Closed
wants to merge 15 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/actions/docker-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ runs:
shell: bash
run: |
docker pull ghcr.io/${{ github.repository }}/${{ inputs.docker_image }}:${{ env.IMAGE_TAG }}
- name: Prepare folders for artifact extracting
id: prepare-for-artifacts
shell: bash
run: |
mkdir -p ${{ github.workspace }}/generated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

told @dimitri-tenstorrent that we should get the docker mounting permissions working so that this shouldn't be necessary

# So cp works later even if no artifacts generated
touch ${{ github.workspace }}/generated/.keep
echo "host-uid=$(id -u)" >> "$GITHUB_OUTPUT"
echo "host-gid=$(id -g)" >> "$GITHUB_OUTPUT"
- uses: addnab/docker-run-action@v3
with:
shell: bash
Expand All @@ -56,13 +65,28 @@ runs:
options: |
--rm
-v ${{ github.workspace }}:/github_workspace:ro
-v ${{ github.workspace }}/generated:/github_generated
--net=host
${{ inputs.docker_opts }}
-e LOGURU_LEVEL=${{ env.LOGURU_LEVEL }}
-e HOST_UID=${{ steps.prepare-for-artifacts.outputs.host-uid }}
-e HOST_GID=${{ steps.prepare-for-artifacts.outputs.host-gid }}
-e PYTHONPATH=/usr/app
${{ inputs.device }}
run: |
cp -r /github_workspace/* /usr/app/
cd /usr/app/
cp -r /github_generated generated/
rm -rf tt_metal tt_eager
${{ inputs.run_args }}
cp -r generated/* /github_generated
ls -hal /github_generated
- name: Delete in case generated files that were copied so that we don't have permissions issues
if: ${{ always() }}
shell: bash
run: |
if [ -d "generated" ]; then
sudo chown -R ${{ steps.prepare-for-artifacts.outputs.host-uid }}:${{ steps.prepare-for-artifacts.outputs.host-gid }} generated/
sudo chmod u+w -R generated
ls -hal generated
fi
Loading