Skip to content

Commit 623793c

Browse files
committed
Jupyter server test added
Signed-off-by: sharvil10 <sharvil.shah@intel.com>
1 parent 0e72d2a commit 623793c

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

enterprise/redhat/openshift-ai/gaudi/docker/Dockerfile.rhel9.2

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,6 @@ RUN cd ${APP_ROOT}/ && \
231231
VLLM_TARGET_DEVICE=hpu pip install -e .
232232

233233
WORKDIR ${APP_ROOT}/src
234-
ENV NOTEBOOK_SAMPLE_LINK="https://raw.githubusercontent.com/sharvil10/ai-containers/main/enterprise/redhat/openshift-ai/gaudi/demo/Getting-started.ipynb"
234+
ENV NOTEBOOK_SAMPLES_LINK="https://raw.githubusercontent.com/sharvil10/ai-containers/main/enterprise/redhat/openshift-ai/gaudi/demo/Getting-started.ipynb"
235235

236236
ENTRYPOINT ["bash", "-c", "/opt/app-root/builder/run"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
test-jupyter-server:
2+
img: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-gaudi-base-${VERSION:-1.17.0}-${REVISION:-495}-rhel-${RHEL_OS:-9.2}
3+
cmd: bash /opt/app-root/notebook-test.sh
4+
serving: True
5+
volumes:
6+
- src: $PWD/enterprise/redhat/openshift-ai/gaudi/tests/notebook-test.sh
7+
dst: /opt/app-root/notebook-test.sh
8+
env:
9+
NOTEBOOK_ARGS: "--ServerApp.token='' --ServerApp.PasswordIdentityProvider.hashed_password=''"
10+
NOTEBOOK_PORT: '8888'
11+
NOTEBOOK_SAMPLES_LINK: 'https://raw.githubusercontent.com/intel/ai-containers/refs/heads/main/enterprise/redhat/openshift-ai/gaudi/demo/oneapi-sample.ipynb'
12+
shm_size: 1g
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
apt-get -y update
6+
apt-get -y install curl jq
7+
8+
echo 'Testing if server is running'
9+
curl --fail -s -X GET http://localhost:8888/api/status
10+
echo ''
11+
12+
echo 'Test if oneapi-sample was downloaded'
13+
if [[ $(curl --fail -s -X GET http://localhost:8888/api/contents | jq -r '.content[] | select(.name=="oneapi-sample.ipynb")') ]]; then
14+
echo 'oneapi-sample.ipynb was downloaded'
15+
else
16+
echo 'oneapi-sample.ipynb was not downloaded'
17+
fi

0 commit comments

Comments
 (0)