RimWorld

RimWorld

AI art
Butterbee Dec 8, 2023 @ 11:25am
3
How to run a local server on Windows
If you wanted to run the generation server locally on your Windows pc but didn't know how to proceed even after looking at the server git page, this guide is for you. It assumes you know how to use the windows command prompt at a basic level.

The server runs in a Docker container which is a sort of virtual machine you will run. You will need to install Docker Desktop. You can find it for windows here.
Install Docker Desktop on Windows [docs.docker.com]


Let it install, and then reboot your pc when it prompts you to.

Next git clone the server that you can find at
https://github.com/boriselec/RimWorld_ArtAiServer. If you do not know how to do that, then click on the green "code" button and select "Download as Zip".


Once it is downloaded, extract the zip to a location of your choice.

Press Win+R and type "CMD" in window that pops up. Click ok or hit enter to open up a command prompt. Navigate to the location where you extracted the server files. If you downloaded them to your "Downloads" folder, type "cd /d %userprofile%\Downloads" and hit enter to change directory to your downloads folder. If you need more help with command prompt a page like this should help you. https://www.digitalcitizen.life/command-prompt-how-use-basic-commands


When your command prompt is in the correct folder, (should contain the files "Dockerfile", "mvnw", and "README.md"), type "docker compose up", press enter and let it run. It will take a few minutes and download about 4gb for the ai model.

Now in rimworld you can go to your mod settings and use "http://localhost:8080/generate" for your generation server URL.

You'll need to have this docker container running while you play in order for it to generate art.

If you want to switch back to the default server, the url is "https://github.com/boriselec/RimWorld_ArtAiServer"

Edit: Added some clarification for how to navigate the command prompt
Last edited by Butterbee; Dec 13, 2023 @ 12:10pm
< >
Showing 1-15 of 18 comments
JageriuS Dec 9, 2023 @ 2:03am 
Is there any way to make it work with API from automatik1111 Stable Diffusion or SDNEXT? If not, is it possible to change the default model used by this mod?
Butterbee Dec 9, 2023 @ 11:27am 
That's way beyond the scope of this write up but it might be possible to change the model but you'd need to explore the contents of the docker container and figure out exactly how it all works. The model seems to be in "/home/huggingface/diffusers/models-dreamlike-art-dreamlike-diffusion-1.0" but I honestly don't quite know what to do to install a new model or point the generator at it. As for pointing the server at your own, I wouldn't know where to begin even looking for how to do that.
Last edited by Butterbee; Dec 9, 2023 @ 11:35am
Vardath Dec 9, 2023 @ 7:16pm 
This is a can't live without mod, if someone makes a new server please share.
wenspez Dec 12, 2023 @ 12:10am 
I'm getting this error when I run the line in command prompt:

docker: 'Compose' is not a docker command.
See 'docker --help'

This is in windows CMD, do I have to it in Docker? How?
Last edited by wenspez; Dec 12, 2023 @ 12:15am
Vardath Dec 12, 2023 @ 2:22am 
Here are the steps you can take to resolve this issue:

Install Docker Compose:
Make sure Docker Compose is installed on your system. If it's not installed, you can download it from the official Docker Compose GitHub repository: Docker Compose Releases.

Add Docker Compose to PATH:
After downloading Docker Compose, make sure its executable is in your system's PATH. You can either add the directory containing the docker-compose executable to your PATH or move the executable to a directory that is already in your PATH.

Restart the Command Prompt:
After making changes to your PATH, restart the Command Prompt to apply the changes.

Verify Installation:
Run the following commands to verify that Docker Compose is installed and recognized:

bash

docker-compose --version

This command should display the version of Docker Compose installed on your system.

Check Docker Version:
Ensure that you have a compatible version of Docker installed on your system. Docker Compose often requires a specific version of Docker to work correctly.

bash

docker --version

Verify that both Docker and Docker Compose are installed and have compatible versions.

After following these steps, you should be able to run Docker Compose commands without encountering the "'Compose' is not a docker command" error.
Vardath Dec 12, 2023 @ 2:25am 
AI helps with this sort of thing, I have no idea what any of that means.
Butterbee Dec 12, 2023 @ 8:20am 
Originally posted by wenspez:
I'm getting this error when I run the line in command prompt:

docker: 'Compose' is not a docker command.
See 'docker --help'

This is in windows CMD, do I have to it in Docker? How?

You don't have to do it in Docker. You're in the right place. Did you restart your pc after installing docker? Do you have Docker Desktop in your start menu?
Butterbee Dec 12, 2023 @ 8:22am 
Originally posted by Vardath:
Here are the steps you can take to resolve this issue:

Install Docker Compose:
Make sure Docker Compose is installed on your system. If it's not installed, you can download it from the official Docker Compose GitHub repository: Docker Compose Releases.

Add Docker Compose to PATH:
After downloading Docker Compose, make sure its executable is in your system's PATH. You can either add the directory containing the docker-compose executable to your PATH or move the executable to a directory that is already in your PATH.

Restart the Command Prompt:
After making changes to your PATH, restart the Command Prompt to apply the changes.

Verify Installation:
Run the following commands to verify that Docker Compose is installed and recognized:

bash

docker-compose --version

This command should display the version of Docker Compose installed on your system.

Check Docker Version:
Ensure that you have a compatible version of Docker installed on your system. Docker Compose often requires a specific version of Docker to work correctly.

bash

docker --version

Verify that both Docker and Docker Compose are installed and have compatible versions.

After following these steps, you should be able to run Docker Compose commands without encountering the "'Compose' is not a docker command" error.

Thanks for the attempt, but ChatGPT is going to mislead you in a lot of ways a lot of times. I doubt many windows users have bash installed for instance. And if they DO have windows subsystem for linux installed and use it, they probably won't have much trouble with docker.

Also, restarting your command prompt does nothing lmao. Restarting windows will initialize certain things but just restarting the command prompt wouldn't help.
Vardath Dec 12, 2023 @ 4:17pm 
All good and understood, I'm just eager to get someone to rebuild a server and I haven't got the patience to sit through even ten minutes of coding to make this work myself.
wenspez Dec 12, 2023 @ 5:17pm 
Originally posted by Butterbee:
Originally posted by wenspez:
I'm getting this error when I run the line in command prompt:

docker: 'Compose' is not a docker command.
See 'docker --help'

This is in windows CMD, do I have to it in Docker? How?

You don't have to do it in Docker. You're in the right place. Did you restart your pc after installing docker? Do you have Docker Desktop in your start menu?

I'm stuck on this part:

"Open up a command prompt and navigate to the location where you extracted the server files.

When your command prompt is in the correct folder"

How do I navigate to a location in the command prompt/put it in the correct folder?
Vardath Dec 12, 2023 @ 5:55pm 
This part I do know.

Find and write down the names and location of the folder you want to access.
enter following command.
cd (the folder location, eg, c:\folder\folder loaction\)
hit enter and hope for the best.
Kubis92 Dec 13, 2023 @ 10:35am 
if you get docker:
'Compose' is not a docker command.
See 'docker --help'

type: Docker compose up

instead Docker Compose Up, just use lowercase, this fixed my problem to get it run
Butterbee Dec 13, 2023 @ 12:09pm 
Originally posted by Kubis92:
if you get docker:
'Compose' is not a docker command.
See 'docker --help'

type: Docker compose up

instead Docker Compose Up, just use lowercase, this fixed my problem to get it run

Thanks for catching that! I updated the page to show the lower case letters
Vardath Dec 13, 2023 @ 8:46pm 
I am simply unable to install Docker. I have a version of windows 10 pro which simply refuses to update properly and I've followed every help I could find. Can someone please replicate this server or this mod?
JageriuS Dec 14, 2023 @ 4:27am 
I tried to commision a fork of this mod to use local Stable Diffusion instances like Automatik1111 which lots of people have and use, and also have an API to just use that instead of installing ton of software for a mod. But coudn't find anyone willing to take up the task.
< >
Showing 1-15 of 18 comments
Per page: 1530 50