Skip to content

Commit

Permalink
Testing poetry install instead of pip
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianZaccaria committed Nov 16, 2023
1 parent 109399f commit 9a8352f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 21 deletions.
44 changes: 27 additions & 17 deletions tests/e2e/install-codeflare-sdk.sh
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion tests/e2e/mnist_raycluster_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
script="mnist.py",
scheduler_args={"requirements": "requirements.txt"},
)
print("Submitting Job OSAOUBDAUDDAOUBDOUBUBAD")
job = jobdef.submit(cluster)

done = False
Expand Down
5 changes: 2 additions & 3 deletions tests/e2e/mnist_raycluster_sdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 9a8352f

Please sign in to comment.