Skip to content

Commit df5df2c

Browse files
committed
Test poetry validation
1 parent 9763624 commit df5df2c

File tree

3 files changed

+18
-27
lines changed

3 files changed

+18
-27
lines changed

.github/scripts/validate_pipy.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
conda create -yp ${ENV_NAME}_pypi python=${MATRIX_PYTHON_VERSION} numpy ffmpeg
2-
#INSTALLATION_PYPI=${MATRIX_INSTALLATION/"cu117"/"cu117_pypi_cudnn"}
3-
#INSTALLATION_PYPI=${INSTALLATION_PYPI/"index-url"/"extra-index-url"}
4-
conda run -p ${ENV_NAME}_pypi ${PYPI_INSTALL_1}
5-
if [ ! -z "${PYPI_INSTALL_2:-}" ]; then
6-
conda run -p ${ENV_NAME}_pypi ${PYPI_INSTALL_2}
2+
3+
if [[ ${MATRIX_CHANNEL} != "release" ]]; then
4+
conda run -p ${ENV_NAME}_pypi pip3 install --pre torch --index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn"
5+
conda run -p ${ENV_NAME}_pypi pip3 install --pre torchvision torchaudio --index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}"
6+
else
7+
conda run -p ${ENV_NAME}_pypi pip3 install torch torchvision torchaudio
78
fi
9+
810
conda run -p ${ENV_NAME}_pypi python ./test/smoke_test/smoke_test.py
911
conda deactivate
1012
conda env remove -p ${ENV_NAME}_pypi

.github/scripts/validate_poetry.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ poetry new test_poetry
99
cd test_poetry
1010

1111
if [[ ${MATRIX_CHANNEL} != "release" ]]; then
12-
# Installing poetry from our custom repo. We need to configure it before use
12+
# Installing poetry from our custom repo. We need to configure it before use and disable authentication
1313
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
1414
poetry source add --priority=explicit domains "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}"
1515
poetry source add --priority=explicit pytorch "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn"
16+
poetry --quiet add --source pytorch torch
17+
poetry --quiet add --source domains torchvision torchaudio
18+
else
19+
poetry --quiet add torch torchaudio torchvision
1620
fi
1721

18-
eval $POETRY_INSTALL_1
19-
if [[ ! -z "${POETRY_INSTALL_2:-}" ]]; then
20-
eval $POETRY_INSTALL_2
21-
fi
2222
python ../test/smoke_test/smoke_test.py
2323
conda deactivate
2424
conda env remove -p ${ENV_NAME}_poetry

.github/workflows/validate-linux-binaries.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,11 @@ jobs:
5757
eval "$(conda shell.bash hook)"
5858
5959
# Special case PyPi installation package. And Install of PyPi package via poetry
60-
# For release we use CUDA 11.7 and for Nightly CUDA 12.1 - todo set the install commands
61-
if [[ ${MATRIX_PACKAGE_TYPE} == "manywheel" ]]; then
62-
63-
if [[ ${MATRIX_GPU_ARCH_VERSION} == "12.1" && ${MATRIX_CHANNEL} != "release" ]]; then
64-
export PYPI_INSTALL_1="pip3 install --pre torch --index-url https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn"
65-
export PYPI_INSTALL_2="pip3 install --pre torchvision torchaudio --index-url https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}"
66-
export POETRY_INSTALL_1="poetry add --source pytorch torch"
67-
export POETRY_INSTALL_2="poetry add --source domains torchvision torchaudio"
68-
elif [[ ${MATRIX_GPU_ARCH_VERSION} == "11.7" && ${MATRIX_CHANNEL} == "release" ]]; then
69-
export PYPI_INSTALL_1="pip3 install torch torchvision torchaudio"
70-
export POETRY_INSTALL_1="poetry --quiet add torch torchaudio torchvision"
71-
fi
72-
73-
if [ ! -z "${PYPI_INSTALL_1:-}" ]; then
74-
source ./.github/scripts/validate_pipy.sh
75-
source ./.github/scripts/validate_poetry.sh
76-
fi
60+
if [[ ${MATRIX_PACKAGE_TYPE} == "manywheel" ]] && \
61+
[[ ${MATRIX_GPU_ARCH_VERSION} == "12.1" && ${MATRIX_CHANNEL} != "release" ] || \
62+
[ ${MATRIX_GPU_ARCH_VERSION} == "11.7" && ${MATRIX_CHANNEL} == "release" ]]; then
63+
source ./.github/scripts/validate_pipy.sh
64+
source ./.github/scripts/validate_poetry.sh
7765
fi
66+
7867
source ./.github/scripts/validate_binaries.sh

0 commit comments

Comments
 (0)