Installation#
Note
If you encounter any issues during installation, please open an issue on GitHub.
Welcome to MineStudio, please follow the tutorial below for installation.
Install JDK 8#
To ensure that the Simulator runs smoothly, please make sure that JDK 8 is installed on your system. We recommend using conda to maintain an environment on Linux systems.
$ conda create -n minestudio python=3.10 -y
$ conda activate minestudio
$ conda install --channel=conda-forge openjdk=8 -y
Install MineStudio#
a. Install MineStudio from the GitHub.
$ pip install git+https://github.com/CraftJarvis/MineStudio.git
b. Install MineStudio from PyPI.
$ pip install minestudio
Install the rendering tool#
For users with nvidia graphics cards, we recommend installing VirtualGL; for other users, we recommend using Xvfb, which supports CPU rendering but is relatively slower.
Note
Installing rendering tools may require root permissions.
There are two options:
$ apt update
$ apt install -y xvfb mesa-utils libegl1-mesa libgl1-mesa-dev libglu1-mesa-dev
Warning
Not all graphics cards support virtualGL. If you do not have speed requirements, it is recommended to use the easier-to-install xvfb rendering tool.
You need to download the following sources:
$ apt update
$ apt install -y xvfb mesa-utils libegl1-mesa libgl1-mesa-dev libglu1-mesa-dev
Install the downloaded package.
$ dpkg -i virtualgl_3.1_amd64.deb
Shutdown the display manager and configure VirtualGL.
$ service gdm stop
Configure VirtualGL.
$ /opt/VirtualGL/bin/vglserver_config
Note
First choose 1,then Yes, No, No, No,finally enter X
Start the display manager.
$ service gdm start
Start the VirtualGL server.
$ bash vgl_entrypoint.sh
Warning
Each time the system is restarted, it may be necessary to run vgl_entrypoint.sh
.
Configure the environment variables.
$ export PATH="${PATH}:/opt/VirtualGL/bin"
$ export LD_LIBRARY_PATH="/usr/lib/libreoffice/program:${LD_LIBRARY_PATH}"
$ export VGL_DISPLAY="egl"
$ export VGL_REFRESHRATE="$REFRESH"
$ export DISPLAY=:1
Verify by running simulator#
Hint
The first time you run it, the script will ask whether to download the compiled model from Hugging Face; just choose Y.
If you are using Xvfb, run the following command:
$ python -m minestudio.simulator.entry
If you are using VirtualGL, run the following command:
$ MINESTUDIO_GPU_RENDER=1 python -m minestudio.simulator.entry
If you see the following output, the installation is successful.
Speed Test Status:
Average Time: 0.03
Average FPS: 38.46
Total Steps: 50
Speed Test Status:
Average Time: 0.02
Average FPS: 45.08
Total Steps: 100