Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suspect long shot but - does this still work in 2024? #7

Open
nirurin opened this issue Jul 20, 2024 · 6 comments
Open

suspect long shot but - does this still work in 2024? #7

nirurin opened this issue Jul 20, 2024 · 6 comments

Comments

@nirurin
Copy link

nirurin commented Jul 20, 2024

As this hasn't been updated in a few years I suspect it's no longer maintained but figured I'd cross my finders and ask the question!

@stubkan
Copy link

stubkan commented Aug 22, 2024

It works. Even the old 5 year old ones should too.

There are newer repos - one I improved here - https://github.com/stubkan/torchapi-wine9/

Also, a newer one for non-Torch servers here - https://github.com/Devidian/docker-spaceengineers

@Phizicks
Copy link

Although it's using an image and not building locally (docker-compose shows image).
if you change it to be

services:
se-torchapi-linux:
image: soyasoya5/se-torchapi-linux:latest
# build: .

it won't work properly and the torch.server.exe suddenly shuts down when run.
it seems the image has changes the git repo doesn't since it starts fine but not a build

@stubkan
Copy link

stubkan commented Oct 19, 2024

It does work, as I stated. I have a torch server running right now. If you are experiencing it failing to work, there is something being missed on your end.

In which case, more information provided by you, such as logs and system information would be helpful in fixing your problem.

@Phizicks
Copy link

Phizicks commented Oct 19, 2024

yeah the image: in docker-compose works but if you change to build: . so you have a local build. the torch server just crashes for some reason when it does an checking for updates after the large 7G download.

so the default clone of the repo pulling from docker hub image seems to work even with latest 1.205 SE version,
you just need to configure it with the server not running, save it after creating the world etc.etc. maybe reload the torch server and then it runs. just had it running now.

but I would like this entrypoint to start the torch server rather than an explorer though

Screenshot from 2024-10-19 19-03-40

@stubkan
Copy link

stubkan commented Oct 19, 2024

The docker image being pulled from the repo is the base operating system with nothing in it - your local docker image is built on top of that using the instructions in the docker file, it should always build locally first run, until you modify the instructions - then it will rebuild.

Regarding the explorer - it starts it because it is creating a virtualized desktop with Openbox and if there is no explorer then when you VNC into the desktop you have no way of accessing the file system or starting programs from VNC interface. So it is kind of necessary to have it.

If you want it to auto start Torch, you can modify the beginning script to launch it after it launches the explorer instance. My version of dockerized torch does it this way. https://github.com/stubkan/torchapi-wine9/

Ie, in the file, xvfb-entrypoint.sh

# Open up file browser
runuser -u wine -- bash -c 'DISPLAY=":99" winefile'

Add the line below, adjusting for your own system if you have it differently;

# Run Torch Server
echo "Starting Torch Server ..."
runuser -u wine -- bash -c 'DISPLAY=":99" wine Z:/app/torch-server/Torch.Server.exe'

After you modify it, the docker file should rebuild and it should auto launch Torch

@Phizicks
Copy link

sorry, didn't mean to steal the thread btw, kind of related though.

I got mine to start without the explorer though it is handy if you want to browse around.
my entry point starts a little different and thought to make it smart to know there's a world already available and autostart but not fully tested with fresh install (ie without a world created). I think it would be better to have an envvar to have an AUTOSTART=true to auto start it or not. so after you've configured it and want it always auto starting, you just set the environment.

echo "## Starting Winefile"
runuser -u wine -- bash -c 'DISPLAY=":99" winefile' &

echo "## Starting Torch.Server"
chmod 755 /app/torch-server/Torch.Server.exe
#  <LoadWorld>Z:\app\torch-server\Instance\Saves\Earth Planet [PC]</LoadWorld>
if [ "$(grep 'LoadWorld><\/LoadWorld' /app/torch-server/Instance/SpaceEngineers-Dedicated.cfg)" ]; then
    runuser -u wine -- /app/torch-server/Torch.Server.exe
else
    runuser -u wine -- /app/torch-server/Torch.Server.exe -autostart -restartoncrash
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants