Skip to content

Commit

Permalink
Switch from pytorch to jupyter-minimal image in notebook tests
Browse files Browse the repository at this point in the history
The pytorch image is large and consumes bandwidth and disk space.
  • Loading branch information
jiridanek committed Feb 28, 2024
1 parent a69568d commit 48b9bd8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@
public class NotebookResource implements ResourceType<Notebook> {

private static final String REGISTRY_PATH = "image-registry.openshift-image-registry.svc:5000";
public static final String PYTORCH_IMAGE = "pytorch";
public static final String PYTORCH_2023_2_TAG = "2023.2";
public static final String JUPYTER_MINIMAL_IMAGE = "jupyter-minimal-notebook";
public static final String JUPYTER_MINIMAL_2023_2_TAG = "2023.2";
private static final Map<String, String> ODH_IMAGES_MAP;

static {
ODH_IMAGES_MAP = Map.<String, String>of(PYTORCH_IMAGE, "jupyter-pytorch-notebook");
ODH_IMAGES_MAP = Map.<String, String>of(JUPYTER_MINIMAL_IMAGE, "jupyter-minimal-notebook");
}

private static final Map<String, String> RHOAI_IMAGES_MAP;

static {
RHOAI_IMAGES_MAP = Map.<String, String>of(PYTORCH_IMAGE, "pytorch");
RHOAI_IMAGES_MAP = Map.<String, String>of(JUPYTER_MINIMAL_IMAGE, "s2i-minimal-notebook");
}
private static final String NOTEBOOK_TEMPLATE_PATH = "notebook.yaml";
@Override
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/odh/test/e2e/standard/NotebookST.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void testCreateSimpleNotebook() throws IOException {
.build();
ResourceManager.getInstance().createResourceWithoutWait(pvc);

String notebookImage = NotebookResource.getNotebookImage(NotebookResource.PYTORCH_IMAGE, NotebookResource.PYTORCH_2023_2_TAG);
String notebookImage = NotebookResource.getNotebookImage(NotebookResource.JUPYTER_MINIMAL_IMAGE, NotebookResource.JUPYTER_MINIMAL_2023_2_TAG);
Notebook notebook = new NotebookBuilder(NotebookResource.loadDefaultNotebook(NTB_NAMESPACE, NTB_NAME, notebookImage)).build();
ResourceManager.getInstance().createResourceWithoutWait(notebook);

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/odh/test/e2e/upgrade/UpgradeAbstract.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public void deployNotebook(String namespace, String name) throws IOException {
.build();
ResourceManager.getInstance().createResourceWithoutWait(pvc);

String notebookImage = NotebookResource.getNotebookImage(NotebookResource.PYTORCH_IMAGE, NotebookResource.PYTORCH_2023_2_TAG);
String notebookImage = NotebookResource.getNotebookImage(NotebookResource.JUPYTER_MINIMAL_IMAGE, NotebookResource.JUPYTER_MINIMAL_2023_2_TAG);
Notebook notebook = new NotebookBuilder(NotebookResource.loadDefaultNotebook(namespace, name, notebookImage)).build();
if (!Environment.PRODUCT.equals(Environment.PRODUCT_DEFAULT)) {
notebook = new NotebookBuilder(NotebookResource.loadDefaultNotebook(namespace, name, notebookImage))
Expand Down

0 comments on commit 48b9bd8

Please sign in to comment.