opendatahub-io / notebooks

Notebook images for ODH
Apache License 2.0
15 stars 51 forks source link

Fix issue with Run and Debug on code-server workbench #556

Closed atheo89 closed 1 month ago

atheo89 commented 1 month ago

Related to: https://issues.redhat.com/browse/RHOAIENG-2312

Description

This PR addresses an issue where users were unable to use the Run and Debug button in the code-server workbench to execute a Python file.

The fix involves adding a launch.json configuration to the .vscode directory. This configuration ensures that the debugger uses the correct Python interpreter, specifically /opt/app-root/bin/python3, which includes pre-installed packages such as numpy.

How Has This Been Tested?

  1. PR code-server built image quay.io/opendatahub/workbench-images@sha256:a25623900cdd8e50135bf618cc231061c1e7a970caa96cd8c880ba596a8cc7cb

    • Replace the code-server:2024.1 image hash with the image from this PR,
    • OR import the PR image from ODH dashboard -> Settings ->Notebook Images -> Import new image and use the newly imported image to spin up the code-server notebook.
  2. Reproduce the steps as shown on the video below: Screencast from 2024-06-12 14-13-59.webm

Merge criteria:

jiridanek commented 1 month ago

I'm checking ghcr.io/atheo89/notebooks/workbench-images:codeserver-ubi9-python-3.9-python-path_1fb7f571f21326f557fa04743d84c43d7336e2b4 from https://github.com/atheo89/notebooks/actions/runs/9484866920/job/26135476419

It appears to work fine now.

/lgtm

atheo89 commented 1 month ago

/override ci/prow/notebooks-e2e-tests /approve

openshift-ci[bot] commented 1 month ago

@atheo89: Overrode contexts on behalf of atheo89: ci/prow/notebooks-e2e-tests

In response to [this](https://github.com/opendatahub-io/notebooks/pull/556#issuecomment-2164897792): >/override ci/prow/notebooks-e2e-tests >/approve Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: atheo89, jiridanek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/opendatahub-io/notebooks/blob/main/OWNERS)~~ [atheo89] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment