Skip to main content

remote-minerl-env

Remote environment for minerl competition environments


PyPI - Python Version GitHub GitHub Workflow Status


Table of Contents

  1. About
  2. Installation
    1. With pip (recommend)
    2. From source
  3. Usage
  4. Examples
  5. Third party notices
  6. License

About

This package allows to run the Minecraft Malmo instance for the minerl contest on any host and allows to access it from another host. The Minecraft instance on the selected host system is not closed to ensure the fastest possible availability. This allows to test the agent code much faster and in case of an error in the agent code you don't have to restart the Minecraft instance again. The host on which the Minecraft instance runs can also be identical to that of the agent.

In addition, the host on which the Malmo instance is running can be on a completely different network and can be accessed without port forwarding. For this purpose a reverse proxy is used, which forwards the requests to this host via an external and publicly accessible server.

Installation

remote-minerl-env requires Python 3.6+ to be installed.

With pip (recommend)

Use the following command to install remote-minerl-env with pip:

pip install remote-minerl-env

You can also very easily update to a newer version:

pip install remote-minerl-env -U

From source

git clone https://github.com/infinityofspace/remote_minerl_env.git
cd remote_minerl_env
pip install .

Usage

After the installation, you can start the remote environment with the following command on the desired host on which you want to run the Minecraft Malmo instance.

remote-minerl-env

All available arguments:

usage: remote-minerl-env [-e ENV_NAME] [-h HOST] [-p PORT] [--help]

optional arguments:
  -e ENV_NAME, --env-name ENV_NAME
                        ID of the minerl environment.
  -h HOST, --host HOST  Host address to bind to.
  -p PORT, --port PORT  Port to bind to.
  --ngrok NGROK_CONFIG_PATH TUNNEL_NAME
                        Use ngrok reverse proxy to expose the environment publicly
  --help                Show the help of the program.

After you have started the remote instance you only need to make minimal adjustments to your existing agent code and then you are done.

You have to use

from remote_minerl_env.environments.client import RemoteClientEnv

env = RemoteClientEnv("<name of the env>")

instead of

env = gym.make("<name of the env>")

That was all. The RemoteEnv also supports the functions step, reset and provides access to the attribute action_space of the original gym environment as class attribute.

Without any additional arguments the instance is only accessible from localhost on port 42424 To expose the Minecraft instance publicly you can use the --ngrok parameter. This uses ngrok to make your local instance accessible from outside your local network:

remote-minerl-env --ngrok /path/to/your/ngrok/config.yml <name-of-the-tunnel-to-use>

The tunnel must be a tcp tunnel and the local mapped port should match the port from the instance, which can be customized with the --port parameter (default port is 42424).

Third party notices

All modules used by this project are listed below:

Name License
minerl LICENSE
setuptools MIT
pyngrok MIT

Furthermore, this readme file contains embeddings of Shields.io badges.

License

MIT - Copyright (c) 2021 Marvin Heptner

Metadata

Release files for remote-minerl-env 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for remote-minerl-env 0.1
File Size Uploaded
remote_minerl_env-0.1.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for remote-minerl-env 0.1
File Interpreter ABI Platform
remote_minerl_env-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.6 kB

Release files / remote_minerl_env-0.1.tar.gz

Download URL remote_minerl_env-0.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b95fdd9555b4c7367ef7278951bdfa1032c84be70043c0af7eec66b8f4a8c9b3
BLAKE2b-256 checksum
How to use checksums
f675fab183977ed6b2df0cc1d803c00f3619a5d75d53cfe297eed34174a4b9c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Release files / remote_minerl_env-0.1-py3-none-any.whl

Download URL remote_minerl_env-0.1-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be4637f3b6fb1099375d5ef37026fd0d17915920a0523b6ed3c9beacf8399e6a
BLAKE2b-256 checksum
How to use checksums
0426f55b1844c50498f003abdf8bdf0b45dcac9927eb061cf41d19bbb6582725
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page