From 9a8352fed325dff38a4a20251c9fe0207537894f Mon Sep 17 00:00:00 2001 From: ChristianZaccaria Date: Thu, 16 Nov 2023 16:13:20 +0000 Subject: [PATCH] Testing poetry install instead of pip --- tests/e2e/install-codeflare-sdk.sh | 44 ++++++++++++++++---------- tests/e2e/mnist_raycluster_sdk.py | 1 - tests/e2e/mnist_raycluster_sdk_test.go | 5 ++- 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/tests/e2e/install-codeflare-sdk.sh b/tests/e2e/install-codeflare-sdk.sh index e30f7ca50..035f798ef 100644 --- a/tests/e2e/install-codeflare-sdk.sh +++ b/tests/e2e/install-codeflare-sdk.sh @@ -1,23 +1,33 @@ #!/bin/bash +# # Install Poetry and configure virtualenvs +# pip install poetry +# poetry config virtualenvs.create false + +# # Clone the CodeFlare SDK repository +# echo "first ls" +# ls +# pip uninstall codeflare-sdk +# echo "install codeflare sdk" +# pip install codeflare_sdk-0.0.0.dev0-py3-none-any.whl +# echo "second ls" +# ls +# # git clone --branch main https://github.com/project-codeflare/codeflare-sdk.git +# # cd codeflare-sdk + +# # # Lock dependencies and install them +# # poetry lock --no-update +# # poetry install --with test,docs + +# # Return to the previous directory +# # cd .. + + # Install Poetry and configure virtualenvs pip install poetry +pip install --upgrade setuptools poetry config virtualenvs.create false -# Clone the CodeFlare SDK repository -echo "first ls" -ls -pip uninstall codeflare-sdk -echo "install codeflare sdk" -pip install codeflare_sdk-0.0.0.dev0-py3-none-any.whl -echo "second ls" -ls -# git clone --branch main https://github.com/project-codeflare/codeflare-sdk.git -# cd codeflare-sdk - -# # Lock dependencies and install them -# poetry lock --no-update -# poetry install --with test,docs - -# Return to the previous directory -# cd .. +# Lock dependencies and install them +poetry lock --no-update +poetry install --with test,docs \ No newline at end of file diff --git a/tests/e2e/mnist_raycluster_sdk.py b/tests/e2e/mnist_raycluster_sdk.py index acfac7204..da83e3446 100644 --- a/tests/e2e/mnist_raycluster_sdk.py +++ b/tests/e2e/mnist_raycluster_sdk.py @@ -62,7 +62,6 @@ script="mnist.py", scheduler_args={"requirements": "requirements.txt"}, ) -print("Submitting Job OSAOUBDAUDDAOUBDOUBUBAD") job = jobdef.submit(cluster) done = False diff --git a/tests/e2e/mnist_raycluster_sdk_test.go b/tests/e2e/mnist_raycluster_sdk_test.go index cf4080aea..d9c81ef83 100644 --- a/tests/e2e/mnist_raycluster_sdk_test.go +++ b/tests/e2e/mnist_raycluster_sdk_test.go @@ -52,12 +52,12 @@ func TestMNISTRayClusterSDK(t *testing.T) { // MNIST training script "mnist.py": ReadFile(test, "mnist.py"), // SDK Wheel File - "codeflare_sdk-0.0.0.dev0-py3-none-any.whl": ReadWhlFile(test, "codeflare_sdk-0.0.0.dev0-py3-none-any.whl"), + // "codeflare_sdk-0.0.0.dev0-py3-none-any.whl": ReadWhlFile(test, "codeflare_sdk-0.0.0.dev0-py3-none-any.whl"), // codeflare-sdk installation script "install-codeflare-sdk.sh": ReadFile(test, "install-codeflare-sdk.sh"), }) - // Create RBAC, retrieve token for user with limited rights + // Create RBAC policyRules := []rbacv1.PolicyRule{ { Verbs: []string{"get", "create", "delete", "list", "patch", "update"}, @@ -124,7 +124,6 @@ func TestMNISTRayClusterSDK(t *testing.T) { {Name: "RAY_IMAGE", Value: GetRayImage()}, }, Command: []string{"/bin/sh", "-c", "cp /test/* . && chmod +x install-codeflare-sdk.sh && ./install-codeflare-sdk.sh && python mnist_raycluster_sdk.py" + " " + namespace.Name}, - // Command: []string{"/bin/sh", "-c", "pip install /test/codeflare_sdk-0.0.0.dev0-py3-none-any.whl && cp /test/* . && python mnist_raycluster_sdk.py" + " " + namespace.Name}, VolumeMounts: []corev1.VolumeMount{ { Name: "test",