Skip to content

Commit

Permalink
Reflect poetry changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianZaccaria committed Oct 5, 2023
1 parent 24c16a8 commit de31b91
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
16 changes: 16 additions & 0 deletions tests/e2e/install-codeflare-sdk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# Install Poetry and configure virtualenvs
pip install poetry
poetry config virtualenvs.create false

# Clone the CodeFlare SDK repository
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 ..
8 changes: 6 additions & 2 deletions tests/e2e/mnist_raycluster_sdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ 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 installation script
"install-codeflare-sdk.sh": ReadFile(test, "install-codeflare-sdk.sh"),

// "codeflare_sdk-0.0.0.dev0-py3-none-any.whl": ReadWhlFile(test, "codeflare_sdk-0.0.0.dev0-py3-none-any.whl"),
},
Immutable: Ptr(true),
}
Expand Down Expand Up @@ -167,7 +170,8 @@ func TestMNISTRayClusterSDK(t *testing.T) {
// FIXME: switch to base Python image once the dependency on OpenShift CLI is removed
// See https://github.com/project-codeflare/codeflare-sdk/pull/146
Image: "quay.io/opendatahub/notebooks:jupyter-minimal-ubi8-python-3.8-4c8f26e",
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},
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
2 changes: 1 addition & 1 deletion tests/e2e/support.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/project-codeflare/codeflare-operator/test/support"
)

//go:embed *.py *.txt
//go:embed *.py *.txt *.sh
var files embed.FS

func ReadFile(t support.Test, fileName string) []byte {
Expand Down

0 comments on commit de31b91

Please sign in to comment.