Changing Torizon appargs withouth rebuilding the image?

Hello,

After changing appargs in Torizon CONFIGURATIONS, the image is rebuilt and deployed again (in debug mode), so that it takes a very long time. Is there another way to change the application arguments without build/deploy operation ?

Best regards,
Fabian

Hi @fdortu ,

Just to be sure, I assume this happens in VSCode, is this correct? What kind of project does this occur: C/C++, Python, .NET?

Best regards,
Lucas Akira

Hi Lucas,

Yes this is in VSCode, with C/C++ (qmake).

Best regards,
Fabian

Thanks for the information.

I’ve talked with our VSCode extension team, and unfortunately there isn’t much we can do to avoid building and deploying the container when changing the configurations, because that’s the way the extension back-end (moses) works: it generates a Dockerfile from the configuration options and from there it builds and deploys the new container.

You can try to avoid redeploying the container without using VSCode and our IDE extension, through the use of environment variables as app arguments in the Dockerfile and setting them when running the container. The downside is you won’t have the debug interface easily accessible nor any other features our extension has.

Currently how long exactly does it take to deploy your project? Maybe consider changing the approach altogether if it’s possible, like hard coding the arguments for a period if they’re for test purposes.

Best regards,
Lucas Akira

Dear @lucas_a.tx,

I found out a solution:

I create a file with the arguments for the application, for example

data/config/appargs.txt

myinptufile.ini --myflag1 --myflag2

The file is deployed together with my application. In my case, I am using QMake with this lines in the .pro file

DESTDIR = $$(QMAKE_DESTIDIR)
...
runscriptC.files = data/config_files/appargs.txt
runscriptC.path = $$DESTDIR/
INSTALLS += runscriptC

Then I configure Torizon with

application.appargs = `cat appargs.txt`

Note that I use right quote (ascii 60) in order to obtain the result string of cat appargs.txt which therfore expands to myinptufile.ini --myflag1 --myflag2

Best regards,
Fabian

Hi @fdortu ,

Glad you were able to find a solution! That’s a very interesting method.

Best regards,
Lucas Akira