Page 1 of 1

termios "inappropriate ioctl" error when running in startup-script

Posted: Wed Jul 28, 2021 1:28 am
by Replicon

So, I'm experimenting with a new approach to using the cloud instances, where I run everything in the startup-script, and have an external watcher keep an eye on the instance. This way, I can automate restarting/rezoning my preemptible instances, and save money over using non-preemptible for the bigger jobs.

Unfortunately, when training runs in the startup-script, it fails with the "inappropriate ioctl for device" error, presumably because there's no terminal to speak of.

Is there either a way to turn off the interactive key mode entirely when running?

Failing that, has anyone figured out a good way to fake a terminal in such an environment as a GCE startup script?


Re: termios "inappropriate ioctl" error when running in startup-script

Posted: Wed Jul 28, 2021 9:41 am
by torzdf

You are correct that a terminal needs to be present to monitor for keypresses.

If you don't mind dabbling in code you could probably script that stuff out from here: https://github.com/deepfakes/faceswap/b ... eypress.py

Otherwise, disabling the terminal monitor is not something I'm likely to be implementing,


Re: termios "inappropriate ioctl" error when running in startup-script

Posted: Wed Jul 28, 2021 2:53 pm
by Replicon

I haven't the faintest about when I'd be able to get to it, but if you're open to a command line parameter that controls whether "interactive" mode is enabled, to let things run in non-terminal environments, I'd be happy to contribute that. Seems like it should be a fairly trivial change (says he without knowing the codebase haha).