[Resolved] Add way to recover edited file - undo changes - I corrupted requirements.txt and the container build failed

I added cupy to my requirements.txt while troubleshooting a Docker WSL issue. The container failed to build and now I had no GUI/Web access to the requirements.txt to restore it. You have to manually ssh into the workbench vm to recover from bad requirements.txt edit

Possible fixes

  1. People ssh into the VM and restore the file. Then they can “build a container” from the GUI.
  2. Add an option to “undo changes” to files in the file view in the workbench probably with the three elipses on the right. There are already options there to delete a file.

Please tick the appropriate box to help us categorize your post
Bug or Error
Feature Request
Documentation Issue
Other

Hi Joe

Thanks for submitting this.

  • What should the “reset” point be for the file?

As for SSH access, the Workbench CLI has a feature that lets you SSH onto the host or directly into the container without too much effort.

The steps are:

  1. Open the relevant terminal, e.g. the NVIDIA-Workbench on Windows
  2. Activate the relevant remote with nvwb activate <remote_name>
  3. Open the relevant Project nvwb open <project_name>
  4. Attach to the Project container nvwb attach
  5. Or, SSH directly onto the host nvwb attach --host

Once you are either on the host or in the Project container, exit will get you back to your local prompt.

I’ll try that. Note that the wrong entry in requirement.txt means you can’t build an image so nothing gets deployed as a project container.

My approach was to ssh into the workbench VM, edit the requirements file directly in the terminal window and then have workbench on GUI on my windows machine try and rebuild the container image. Repeat until it worked.

ah yes. you are correct.

that is why the nvwb attach --host command is there.

i typically have the desktop app open at the same time as the CLI with the Project open so can manage these kinds of things quickly.

Just to confirm, you can’t remove the cupy package from Environment > Packages in the AI Workbench UI and rebuild the project?

1 Like

Will investigate this evening. I realize that I could change the packages there

remove the cupy package from Environment > Packages in the AI Workbench UI and rebuild the project

That worked. I was able to change the contents of the requirements.txt via the Environment tab so that I could rebuild the image. Had to clear the cache to get it to recognize I needed a rebuild. Not a big deal. A contributing factor may be that the Packages section is truncated. I had to press “view more” in the Packages section to the offending requirements.txt entry.

Here is a video of me fixing my container build

1 Like