ya-runtime-dbg, a tool built specifically for debugging user-built images.
.debpackage you can also download a pre-built binary (
.tar.gzfile in the most recent GitHub release).
ya-runtime-dbgrequires one of the available Golem runtimes to be available on your system.
~/.local/lib/yagna/plugins(again, we're assuming Linux as it's the only supported platform for
ya-runtime-dbgtogether with our image. We can learn about the program's required arguments by calling
--runtimepath to the Golem runtime we want to use,
--task-packagepath to the package (i.e.
.gvmiimage) we'd like to debug,
--workdirpath to the directory that will store directories mounted as volumes inside the image.
\so that it's easier to read. Some remarks related to the above call:
--task-packageneeds to be changed so that it points to where you built your
/tmp/workdiris an example path, it may not exist on your system. You can create it by calling
mkdir /tmp/workdiror use some other location.
▶). This indicates the debugger is now ready to be used!
bash(indicated by the name next to the prompt character). This means we can use regular command line tools, for example:
pwd(present working directory) returns
/golem/work, matching the path we specified in
WORKDIRin our original
volsfield from the second line):
--workdirwhen starting the debugger (in our case it's
/golem/inputinside the VM. Looking at the mapping definition above, this directory is going to be
Ctrl+Dwhile in the debugger prompt.
ya-runtime-dbgprovides us with the exact same environment a provider would use to execute our image. This allows for more accurate testing compared to running the original Docker image manually.