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

add sanity test for docker build and run #831

Merged
merged 24 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ac72934
improve doc around supported tasks and accelertor options
rbrugaro Jun 3, 2024
2a0be04
Merge branch 'huggingface:main' into main
rbrugaro Jun 4, 2024
ad44975
leave other accelerator options even if not yet implemented
rbrugaro Jun 4, 2024
210b994
Merge branch 'huggingface:main' into main
rbrugaro Jun 27, 2024
f41d468
Merge branch 'huggingface:main' into main
rbrugaro Jul 1, 2024
3a9254c
Merge branch 'huggingface:main' into main
rbrugaro Jul 8, 2024
858f8d1
Merge branch 'huggingface:main' into main
rbrugaro Jul 12, 2024
c6e8557
bump ipex/torch vs, fix syntax to supress build warnings/errors and i…
rbrugaro Jul 12, 2024
6215a4e
simplified Dockerfile, remove build stages and conda
rbrugaro Jul 17, 2024
2dc75f7
rm proxies
rbrugaro Jul 17, 2024
138b1e4
add sanity test for docker build and run
rbrugaro Jul 19, 2024
86930cd
Merge branch 'huggingface:main' into main
rbrugaro Jul 19, 2024
0a553cf
add dependency
rbrugaro Jul 22, 2024
498731c
add docker workflow
rbrugaro Jul 23, 2024
2298a01
fix version
rbrugaro Jul 23, 2024
437ef7d
fix version
rbrugaro Jul 23, 2024
34b378f
path to dockerfile
rbrugaro Jul 23, 2024
f69c2c6
remove sanity_test script and replaced with workflow
rbrugaro Jul 23, 2024
fb20a8f
remove workflow_dispatch for manual trigger
rbrugaro Jul 23, 2024
2575e7c
Merge branch 'huggingface:main' into main
rbrugaro Jul 25, 2024
5831d39
Update .github/workflows/dockerfile_sanity.yml
rbrugaro Jul 26, 2024
549835e
Merge branch 'huggingface:main' into main
rbrugaro Jul 26, 2024
3621ad8
Merge branch 'huggingface:main' into main
rbrugaro Jul 29, 2024
3a55cb4
path to Dockerfile
rbrugaro Jul 29, 2024
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
44 changes: 44 additions & 0 deletions .github/workflows/dockerfile_sanity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and Test Docker Image

on:
push:
branches:
- main
paths:
- 'Dockerfile.intel'
Copy link
Member

Choose a reason for hiding this comment

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

docker/Dockerfile.intel

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thx! I used workflow_dispatch to manually trigger and test the workflow and forgot to update path for the auto triggering with file changes. Added!


pull_request:
branches:
- main
paths:
- 'Dockerfile.intel'

jobs:
build_and_run:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and Run Docker Image
run: |
IMAGE_NAME="intel_image:latest"
docker build -f docker/Dockerfile.intel -t $IMAGE_NAME .
if [ $? -ne 0 ]; then
echo "Docker image build failed."
exit 1
fi
CONTAINER_ID=$(docker run -d $IMAGE_NAME tail -f /dev/null)
if docker inspect -f '{{.State.Running}}' $CONTAINER_ID 2>/dev/null | grep -q 'true'; then
echo "Container is running."
else
echo "Container failed to start."
docker logs $CONTAINER_ID 2>/dev/null || echo "No container ID found."
exit 1
fi
docker stop $CONTAINER_ID
docker rm $CONTAINER_ID
1 change: 1 addition & 0 deletions docker/Dockerfile.intel
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ ARG TORCHVISION_VERSION=0.18.1+cpu
ARG TORCHAUDIO_VERSION=2.3.1+cpu

RUN python3 -m pip install --no-cache-dir \
intel-openmp \
torch==${PYTORCH_VERSION}+cpu \
torchvision==${TORCHVISION_VERSION} \
torchaudio==${TORCHAUDIO_VERSION} \
Expand Down
Loading