You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: Update Pipfiles in accordance with Codeflare-SDK latest release
74
+
run: |
75
+
package_name=kubeflow-training
76
+
available_python_versions=("$PYTHON_VERSION") # add space separated python versions according to 'python-versions' specified in 'Setup Python Environment' step
77
+
install_package_using_pipenv(){
78
+
# args allow custom names for Pipfile and Pipfile.lock
79
+
if [ $# -eq 2 ]; then
80
+
mv "${1}" Pipfile
81
+
mv "${2}" Pipfile.lock
82
+
fi
83
+
# replace existing version of cf-sdk with new version in Pipfile
84
+
sed -i "s/$package_name = \"==[^\"]*\"/$package_name = \"~=${TRAINING_SDK_RELEASE_VERSION}\"/" Pipfile
85
+
# Lock dependencies, ensuring pre-release are included and clear previous state
86
+
if ! pipenv lock --verbose --pre --clear ; then
87
+
echo "Failed to lock dependencies"
88
+
exit 1
89
+
fi
90
+
# remove virtual env and clear cache
91
+
if ! pipenv --rm --clear ; then
92
+
echo "Failed to remove virtual environment"
93
+
exit 1
94
+
fi
95
+
if [ $# -eq 2 ]; then
96
+
mv Pipfile "${1}"
97
+
mv Pipfile.lock "${2}"
98
+
fi
99
+
}
100
+
# Get the list of available versions for the package
101
+
if ! versions=$(pipenv run pip-versions list $package_name);then
102
+
echo "Failed to retrieve versions for $package_name"
103
+
exit 1
104
+
fi
105
+
# Check if the desired version exists in the list
106
+
if echo "$versions" | grep -q "${TRAINING_SDK_RELEASE_VERSION}"; then
107
+
echo "Version ${TRAINING_SDK_RELEASE_VERSION} is available for $package_name"
pr_title: "[Kubeflow-Training Action] Update notebook's pipfile to sync with Kubeflow-Training SDK release ${{ env.TRAINING_SDK_RELEASE_VERSION }}"
173
+
pr_body: |
174
+
:rocket: This is an automated Pull Request generated by [odh-kfto-sdk-notebooks-sync.yml](https://github.com/opendatahub-io/training-operator/tree/dev/.github/workflows/odh-kfto-sdk-notebooks-sync.yml) workflow.
175
+
176
+
This PR updates the `Pipfile` to sync with latest Kubeflow-Training SDK release.
0 commit comments