Skip to content

Commit

Permalink
[jupyter] update tutorials fix to development (#1003)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviaIguazio authored Nov 6, 2023
1 parent 3de44aa commit a2d5fc8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
2 changes: 1 addition & 1 deletion stable/jupyter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.14.33
version: 0.14.34
apiVersion: v1
appVersion: 3.4.8
name: jupyter
Expand Down
27 changes: 6 additions & 21 deletions stable/jupyter/templates/jupyter-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -530,27 +530,12 @@ data:
log 'Configure tutorials'
curl -L ${IGZ_JUPYTER_TUTORIALS_URL} -o /tmp/jupyter-tutorials
curl -L ${IGZ_MLRUN_DEMOS_URL} -o /tmp/mlrun-demos
TUTORIALS_SCRIPT_FILE=`tar --list --file=/tmp/jupyter-tutorials|grep igz-tutorials-get.sh`
DEMOS_SCRIPT_FILE=`tar --list --file=/tmp/jupyter-tutorials|grep update-demos.sh`
UPDATE_NOTEBOOK_FILE=`tar --list --file=/tmp/jupyter-tutorials|grep update-tutorials.ipynb`
tar -C /tmp -xvf /tmp/jupyter-tutorials ${TUTORIALS_SCRIPT_FILE} --strip-components=1
tar -C /tmp -xvf /tmp/jupyter-tutorials ${UPDATE_NOTEBOOK_FILE} --strip-components=1
tar -C /tmp -xvf /tmp/jupyter-tutorials ${DEMOS_SCRIPT_FILE} --strip-components=1
if ! /tmp/igz-tutorials-get.sh; then
tar -C ${HOME} -xvf /tmp/jupyter-tutorials --strip-components=1
rm -f /tmp/jupyter-tutorials
else
cp /tmp/igz-tutorials-get.sh ${HOME}
cp /tmp/update-tutorials.ipynb ${HOME}
cp /tmp/update-demos.sh ${HOME}
fi
if ! bash /tmp/update-demos.sh --mlrun-ver `curl -s ${IGZ_MLRUN_API_ENDPOINT}/api/v1/client-spec | python3 -c "import sys, json; print(json.load(sys.stdin)['version'])"`; then
mkdir -p ${HOME}/demos
tar -C ${HOME}/demos -xvf /tmp/mlrun-demos --strip-components=1
rm -f /tmp/mlrun-demos
fi
chmod a+x ${HOME}/igz-tutorials-get.sh ${HOME}/update-demos.sh
rm -f /tmp/igz-tutorials-get.sh /tmp/update-demos.sh /tmp/update-tutorials.ipynb
tar -C ${HOME} -xvf /tmp/jupyter-tutorials --strip-components=1
rm -f /tmp/jupyter-tutorials
mkdir -p ${HOME}/demos
tar -C ${HOME}/demos -xvf /tmp/mlrun-demos --strip-components=1
rm -f /tmp/mlrun-demos
chmod a+x ${HOME}/demos/update-demos.sh || chmod a+x ${HOME}/update-demos.sh || echo 'no update-demos.sh found'
touch ${HOME}/.igz/.getting-started
fi

Expand Down

0 comments on commit a2d5fc8

Please sign in to comment.