Juice Box setup

Discover how to set up a “Juice Box”, a mini PC that remotely leverages remote GPU power of your main gaming PC or server with Juice. Our comprehensive guide takes you through each step, from setting up the Juice Server to running high-end games and AI applications. Perfect for gamers, tech enthusiasts, and machine learning practitioners.

Today we're embarking on a fantastic adventure. We are going to set up a "Juice Box" at home - the ultimate solution for all your gaming, machine learning, and graphics-intensive needs. It's like having your gaming PC or workstation right in your living room or anywhere else in your home (or even on the go!), minus the humongous size and noise.

For those wondering, "what on earth is a Juice Box?" let's clear the air. It's a mini PC, like a NUC, equipped primarily with a CPU and perhaps integrated graphics. However, the magic lies in its ability to connect remotely to your main beast - the gaming PC or local home server loaded with a powerful GPU. This means you can launch applications on the Juice Box using the muscle of the remote GPU. Sounds incredible, right?

Let’s do it!

Step 1: Setting Up Your Powerful GPU Machine for Juice Server

Don't worry, we've got you covered. This guide will help you take every step you need to prepare your GPU machine for the Juice Server. Ready? Let's dive in!

For Windows Users:

1. Install Prerequisites:

First off, we need to make sure your machine has everything it needs to run Juice. Here's what you need:

  • Install NVIDIA driver 516.59 or later: Your GPU needs the latest drivers to perform at its best. You can download these drivers from the official NVIDIA website.
  • Install the Microsoft Visual C++ runtime: This is essential for running the Juice server. You can find this on the Microsoft official website.
  • Allow access to TCP port 43210: You need to make sure that your firewall doesn't block the required port. You can do this in your firewall settings.

2. Install Juice Server Software:

  • Run setup.bat: Extract the zip file you just downloaded and locate setup.bat in the JuiceServer directory. Double-click it to run.

3. Run the Server:

  • Run the Juice server by executing run.bat: You will see a new command prompt window open up. Leave it running, you should see a message indicating the server is successfully listening on port 43210.

Note: Juice caches data on the server to reduce network traffic when loading. The disk space needed varies based on use case, but starting with 50GB or more is a good idea. The cache can be cleared manually without interrupting Juice operation.

For Linux Users:

1. Install Prerequisites:

Just as with Windows, your Linux machine also needs some preparation before installing Juice.

  • Install NVIDIA driver 515.48 or later and reboot: This driver is available on the official NVIDIA website.
  • Install CUDA toolkit 11.7: CUDA is a parallel computing platform and API model created by NVIDIA. It allows software developers to use a CUDA-enabled graphics processing unit (GPU) for general purpose processing. You can download the toolkit from the NVIDIA website.
  • Allow access to TCP port 43210 (optional): This can be done by running the command sudo ufw allow 43210.

2. Install Juice Server Software:

  • Run setup.sh in the directory: This will initiate the installation process.

3. Run the Server:

  • Run the Juice server by executing run.sh: A new terminal window will open. Leave it running, you should see a message indicating the server is successfully listening on port 43210.

Note: Just like with Windows, Juice caches data on the server to reduce network traffic when loading. The disk space needed varies based on use case, but starting with 50GB or more is a good idea. The cache can be cleared manually without interrupting Juice operation.

That wraps up Step 1! You've successfully prepared your machine and installed the Juice server. Next, we'll set up your Juice Box. Don't worry, it's not as hard as it seems. We're with you all the way! Stay tuned!

Sure, let's get into the nitty-gritty of setting up your Juice Box!

Step 2: Getting Your Juice Box Ready for Some Sweet, Sweet GPU Power

This is where the real fun starts! In this step, we're going to turn your Juice Box (aka your mini PC) into a client machine that can tap into your powerful GPU. Don't worry if you're not tech-savvy, we're here to guide you through every detail.

For Windows Users:

1. Install Prerequisites:

Before we start with Juice, we need to get your system ready:

  • Download and install the Microsoft Visual C++ runtime: This is a must-have for running the Juice client. You can find it on the Microsoft official website.

2. Install Juice Client:

3. Configure the Server Connection:

Here's where you tell your Juice Box where to find the juicy GPU power:

  • Edit juice.cfg: Locate this file in the JuiceClient directory you've created. Open it and set host to the IP address or hostname of the Juice server you want to connect to (this is the powerful GPU machine you set up in Step 1).

With this done, your Windows Juice Box is ready to take advantage of your GPU's power! You can find examples of running applications with Juice on Windows in the Juice for Graphics and Juice for Compute sections.

For Linux Users:

1. Install Prerequisites:

Again, we start by ensuring your system is ready for Juice:

  • Install Vulkan, OpenGL, and GLib: You can do this on an Ubuntu-based system by running sudo apt update followed by sudo apt install libvulkan1 libgl1 libglib2.0-0 in the terminal.

2. Install Juice Client:

3. Configure the Server Connection:

Time to connect your Juice Box to your GPU server:

  • Edit juice.cfg: In the JuiceClient directory, find this file and open it. Set host to the IP address or hostname of your Juice server (this is the powerful GPU machine from Step 1).

And there you have it! Your Linux Juice Box is now ready to start tapping into the GPU power of your main machine. For examples of running applications with Juice on Linux, see Juice for Compute. Please note that the Juice client for Linux doesn't currently support graphics workloads.

That's it! You've successfully set up your Juice Box. Stay tuned for Step 3, where we'll teach you how to launch applications on your Juice Box using your remote GPU's power. You're doing amazing! Let's keep going!

Step 3: Launching Applications and Games with Juice

After confirming that your environment is correctly set up, you can now use Juice to launch a range of applications. In this guide, we'll start with a simple gaming example, move on to launching games via Steam, and standalone games. Lastly, we'll conclude with an AI application example.

  1. Launching vkcube with Juice
    We'll start with vkcube, a simple Vulkan demo application, to demonstrate the basic Juice command.
    To launch vkcube, use the following command:
    juicify vkcube
    If the command runs successfully, you should see the Juice heads-up-display in the upper left corner of the vkcube window.
  2. Launching Steam Games with Juice
    Juice can be used to run games installed via the Steam platform.
    The simplest method is to run a game directly using Juice. Here's an example using a hypothetical game, replace "YourGame" with the name of the actual game you wish to run:
    juicify "C:\Program Files (x86)\Steam\steamapps\common\YourGame\YourGame.exe"
    If running the game directly doesn't work, you can try placing the Steam App ID in a steam_appid.txt file in the same directory as the game executable, then running it with Juice. Here's an example:
    juicify "C:\Program Files (x86)\Steam\steamapps\common\YourGame\YourGame.exe"
    Finally, if the above two methods do not work, you can close Steam and then relaunch it using Juice. After this, anything launched through Steam should use Juice. Here's how to relaunch Steam with Juice:
    juicify "C:\Program Files (x86)\Steam\steam.exe"
  3. Launching Standalone Games like Cyberpunk 2077 with Juice
    Juice can also run standalone games that are not hosted on the Steam platform. For instance, if you have the popular game Cyberpunk 2077 installed separately, you can run it with Juice like this:
    juicify "C:\Path\To\Cyberpunk2077\Cyberpunk2077.exe"
    Replace the path with the correct path to Cyberpunk 2077 (or any other game) on your system. This command would enable you to utilize Juice's GPU acceleration while playing the game.
  4. Launching AI Applications like Stable Diffusion with Juice
    Lastly, Juice can be used to accelerate AI applications such as Stable Diffusion. After you have set up Stable Diffusion, you can run it with Juice as follows:
    On Windows:
    juicify webui-user.bat
    On Linux:
    juicify webui-user.sh
    Once the command runs successfully, you can navigate to http://127.0.0.1:7860 in your browser to view the user interface and generate images using the accelerated Stable Diffusion.

—---

And that's it! You now have a Juice Box that runs applications as if it had a high-end GPU installed. Remember, the power isn't in the box, it's in the Juice!

So, folks, get juicing, and take your computing experience to the next level! And as always, if you have any questions, drop them in the comments below. Happy Juicing!

Dean Beeler
Making GPU easy, anywhere @ Juice Labs