File tree 1 file changed +11
-4
lines changed
.buildkite/scripts/hardware_ci 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 5
5
set -ex
6
6
7
7
# Setup cleanup
8
- remove_docker_container () { podman rm -f cpu-test-ubi9-ppc || true ; podman system prune -f; }
8
+ remove_docker_container () {
9
+ if [[ -n " $container_id " ]]; then
10
+ podman rm -f " $container_id " || true
11
+ fi
12
+ podman system prune -f
13
+ }
9
14
trap remove_docker_container EXIT
10
15
remove_docker_container
11
16
12
17
# Try building the docker image
13
18
podman build -t cpu-test-ubi9-ppc -f docker/Dockerfile.ppc64le .
14
19
15
20
# Run the image
16
- podman run -itd --entrypoint /bin/bash -v /tmp/:/root/.cache/huggingface --privileged=true --network host -e HF_TOKEN --name cpu-test-ubi9-ppc cpu-test-ubi9-ppc
21
+ container_id= $( podman run -itd --entrypoint /bin/bash -v /tmp/:/root/.cache/huggingface --privileged=true --network host -e HF_TOKEN cpu-test-ubi9-ppc)
17
22
18
23
function cpu_tests() {
19
24
20
25
# offline inference
21
- podman exec cpu-test-ubi9-ppc bash -c "
26
+ podman exec -it " $container_id " bash -c "
22
27
set -e
23
28
python3 examples/offline_inference/basic/generate.py --model facebook/opt-125m"
24
29
25
30
# Run basic model test
26
- podman exec cpu-test-ubi9-ppc bash -c "
31
+ podman exec -it " $container_id " bash -c "
27
32
set -e
28
33
pip install pytest pytest-asyncio einops peft Pillow soundfile transformers_stream_generator matplotlib
29
34
pip install sentence-transformers datamodel_code_generator
@@ -33,6 +38,8 @@ function cpu_tests() {
33
38
}
34
39
35
40
# All of CPU tests are expected to be finished less than 40 mins.
41
+
42
+ export container_id
36
43
export -f cpu_tests
37
44
timeout 40m bash -c cpu_tests
38
45
You can’t perform that action at this time.
0 commit comments