Fix docker compose failures (#1439)
* fix docker compose failures Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com> * restore compose test Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com> --------- Signed-off-by: Paul S. Schweigert <paul@paulschweigert.com>
This commit is contained in:
parent
e41a1b132d
commit
aae5fd89ec
|
@ -0,0 +1,74 @@
|
||||||
|
name: Docker notebook tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 45
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Build the function
|
||||||
|
run: docker build -t test_function:latest --build-arg TARGETARCH="amd64" -f ./tests/basic/function/Sample-Docker ./tests/basic
|
||||||
|
- name: Build the containers
|
||||||
|
run: docker compose -f docker-compose-dev.yaml build
|
||||||
|
- name: Run the jupyter profile
|
||||||
|
run: docker compose -f docker-compose-dev.yaml up -d
|
||||||
|
- name: Give containers time to initialize
|
||||||
|
shell: bash
|
||||||
|
run: sleep 90
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
- name: install dependencies
|
||||||
|
shell: bash
|
||||||
|
run: pip install client/
|
||||||
|
- name: Run basic tests
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd tests/basic
|
||||||
|
for f in *.py; do echo "$f" && python "$f" &>> basic.log; done
|
||||||
|
done=$(cat basic.log | grep -c "DONE")
|
||||||
|
if [[ $done == 4 ]]
|
||||||
|
then
|
||||||
|
echo "OK"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "FAILED: One or more programs failed during execution"
|
||||||
|
cat basic.log
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done=$(cat basic.log | grep -c "Completed running pattern")
|
||||||
|
if [[ $done == 2 ]]
|
||||||
|
then
|
||||||
|
echo "OK"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "FAILED: One or more programs failed during execution"
|
||||||
|
cat basic.log
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cd -
|
||||||
|
- name: Run experimental tests
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd tests/experimental
|
||||||
|
for f in *.py; do echo "$f" && python "$f" &>> experimental.log; done
|
||||||
|
done=$(cat experimental.log | grep -c "DONE")
|
||||||
|
if [[ $done == 6 ]]
|
||||||
|
then
|
||||||
|
echo "OK"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "not OK"
|
||||||
|
cat experimental.log
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cd -
|
||||||
|
- name: Dump logs on failure
|
||||||
|
if: ${{ failure() }}
|
||||||
|
run: |
|
||||||
|
docker compose logs gateway
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# compose config for running images based on local files
|
# compose config for running images based on local files
|
||||||
services:
|
services:
|
||||||
ray-head:
|
ray-head:
|
||||||
|
user: "0"
|
||||||
container_name: ray-head
|
container_name: ray-head
|
||||||
build:
|
build:
|
||||||
context: ./
|
context: ./
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# compose config on latest release builds
|
# compose config on latest release builds
|
||||||
services:
|
services:
|
||||||
ray-head:
|
ray-head:
|
||||||
|
user: "0"
|
||||||
container_name: ray-head
|
container_name: ray-head
|
||||||
image: icr.io/quantum-public/qiskit-serverless/ray-node:${VERSION:-0.14.2}-py310
|
image: icr.io/quantum-public/qiskit-serverless/ray-node:${VERSION:-0.14.2}-py310
|
||||||
entrypoint: [
|
entrypoint: [
|
||||||
|
|
Loading…
Reference in New Issue