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

Want to use Faceswap in The Cloud? This is not directly supported by the Devs, but you may find community support here


Forum rules

Read the FAQs and search the forum before posting a new topic.

NB: The Devs do not directly support using Cloud based services, but you can find community support here.

Please mark any answers that fixed your problems so others can find the solutions.

Locked
User avatar
Replicon
Posts: 50
Joined: Mon Mar 22, 2021 4:24 pm
Been thanked: 2 times

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

Post 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?

User avatar
torzdf
Posts: 2636
Joined: Fri Jul 12, 2019 12:53 am
Answers: 156
Has thanked: 128 times
Been thanked: 614 times

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

Post 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,

My word is final

User avatar
Replicon
Posts: 50
Joined: Mon Mar 22, 2021 4:24 pm
Been thanked: 2 times

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

Post 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).

Locked