Skip to content
Closed
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -334,31 +334,31 @@ validate-runtime-image: # Validate that runtime image meets minimum criteria
echo "Validating container image $$image" ; \
echo "-----------------------------------------------------------" ; \
echo "=> Loading container image ..." ; \
docker inspect $$image > /dev/null 2>&1 ; \
$(CONTAINER_EXEC) inspect $$image > /dev/null 2>&1 ; \
if [ $$? -ne 0 ]; then \
echo Container image $$image is not present, pulling... ; \
docker pull $$image ; \
$(CONTAINER_EXEC) pull $$image ; \
if [ $$? -ne 0 ]; then \
echo "ERROR: pull of container image $$image failed" ; \
exit 1; \
fi; \
fi; \
for cmd in $$required_commands ; do \
echo "=> Checking container image $$image for $$cmd..." ; \
docker run --rm --entrypoint /bin/bash $$image -c "which $$cmd" > /dev/null 2>&1 ; \
$(CONTAINER_EXEC) run --rm --entrypoint /bin/bash $$image -c "which $$cmd" > /dev/null 2>&1 ; \
if [ $$? -ne 0 ]; then \
echo "ERROR: Container image $$image does not meet criteria for command: $$cmd" ; \
fail=1; \
continue; \
fi; \
if [ $$cmd == "python3" ]; then \
IMAGE_PYTHON3_MINOR_VERSION=`docker run --rm --entrypoint /bin/bash $$image -c "$$cmd --version" | cut -d' ' -f2 | cut -d'.' -f2` ; \
IMAGE_PYTHON3_MINOR_VERSION=`$(CONTAINER_EXEC) run --rm --entrypoint /bin/bash $$image -c "$$cmd --version" | cut -d' ' -f2 | cut -d'.' -f2` ; \
if [[ $$IMAGE_PYTHON3_MINOR_VERSION -lt 8 ]]; then \
echo "WARNING: Container image $$image requires Python 3.8 or greater for latest generic component dependency installation" ; \
fail=1; \
elif [[ $$IMAGE_PYTHON3_MINOR_VERSION -ge 8 ]]; then \
echo "=> Checking notebook execution..." ; \
docker run -v $$(pwd)/etc/generic:/opt/elyra/ --rm --entrypoint /bin/bash $$image -c "python3 -m pip install -r /opt/elyra/requirements-elyra.txt && \
$(CONTAINER_EXEC) run -v $$(pwd)/etc/generic:/opt/elyra/ --rm --entrypoint /bin/bash $$image -c "python3 -m pip install -r /opt/elyra/requirements-elyra.txt && \
curl https://raw.githubusercontent.com/nteract/papermill/main/papermill/tests/notebooks/simple_execute.ipynb --output simple_execute.ipynb && \
python3 -m papermill simple_execute.ipynb output.ipynb > /dev/null" ; \
if [ $$? -ne 0 ]; then \
Expand All @@ -373,7 +373,7 @@ validate-runtime-image: # Validate that runtime image meets minimum criteria
done ; \
if [ $(REMOVE_RUNTIME_IMAGE) -eq 1 ]; then \
echo Removing container image $$image... ; \
docker rmi $$image > /dev/null ; \
$(CONTAINER_EXEC) rmi $$image > /dev/null ; \
fi; \
echo "-----------------------------------------------------------" ; \
if [ $$fail -eq 1 ]; then \
Expand Down
5 changes: 5 additions & 0 deletions docs/source/recipes/creating-a-custom-runtime-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ The [Elyra `Makefile`](https://github.com/elyra-ai/elyra/blob/main/Makefile) inc
```bash
$ make validate-runtime-image image=my-runtime-image
```
If using `podman`, ensure the following environmental variables are set prior to running the release script:
```bash
CONTAINER_EXEC=podman
CONTAINER_OUTPUT_OPTION="--format docker"
```

If no problems were detected the output should look as follows:

Expand Down