piston icon indicating copy to clipboard operation
piston copied to clipboard

Adding multiple packages at once

Open SammyWhamy opened this issue 1 year ago • 4 comments

I would like to see a way to install multiple packages at once. Currently, i run this in docker, and i dont want to make like ~25 api requests just to install the packages. I know you can do something with building the container yourself and adding them, but I don't want to have to maintain the image myself. I don't mind the install time, but I'd just like an easy way to automate installing a list of packages.

I've also seen stuff about a specfile, which I can't really find any docs on aside from using them in the build step. It would be great if piston could be configured to read the specfile on startup!

SammyWhamy avatar Sep 25 '24 12:09 SammyWhamy

I had the same use case. My solution was to write a Python script which executes once the container is deployed and sends the POST requests to the Piston endpoint in order to install the runtimes envs.

I am fallowing in case another alternative exists.

karastoyanov avatar Sep 25 '24 15:09 karastoyanov

Yes this is my seemingly the only option currently. If there was a way to at least do multiple packages in one api request, that would be much more viable. But as per #270 this was rejected and instead implemented in the cli.

SammyWhamy avatar Sep 25 '24 20:09 SammyWhamy

There is absolutely no reason to worry about API request count or bandwidth when you're requesting in the same server. although this might be useful in multi-server setup.

dmgnr avatar Sep 25 '24 20:09 dmgnr

It's not about throughput, it's about the fact I'd have to use some other language to, for example, loop over an array of package specifications to then execute them one by one. Piston seems to have a nice thing doing exactly this (specfile) but currently seems to be only usable in the build stage (Please correct me if im wrong on this). It would be very nice if this can be used on startup too. This way I'd just need to commit one specfile, which would also make sure I'm up to date on versions and get new packages once they are available in piston

SammyWhamy avatar Sep 25 '24 20:09 SammyWhamy