Git Product home page Git Product logo

ai2thor-docker's Introduction


AI2-THOR Docker

AI2-THOR Docker is a mini-framework that simplifies the task of running AI2-THOR within Docker. The primary feature this adds is configuring and running a X server to be used by Unity3d to render scenes.

Getting Started

To use AI2-THOR Docker you must have Docker installed on your host and a Nvidia GPU (required for 3D rendering).

  1. Clone or fork this repository.

    git clone https://github.com/allenai/ai2thor-docker
  2. Build the Docker container.

    cd ai2thor-docker
    ./scripts/build.sh
    
  3. Run the example agent using Docker.

    ./scripts/run.sh
    

At this point you should see output that resembles the following:


PlayerPrefs - Creating folder: /root/.config/unity3d/Allen Institute for Artificial Intelligence
PlayerPrefs - Creating folder: /root/.config/unity3d/Allen Institute for Artificial Intelligence/AI2-Thor
Logging to /root/.config/unity3d/Allen Institute for Artificial Intelligence/AI2-Thor/Player.log
Initialize return: {'cameraNearPlane': 0.1, 'cameraFarPlane': 20.0}
{'cameraHorizon': 0.0,
 'inHighFrictionArea': False,
 'isStanding': True,
 'name': 'agent',
 'position': {'x': -1.5, 'y': 0.9009982347488403, 'z': -1.5},
 'rotation': {'x': 0.0, 'y': 270.0, 'z': 0.0}}

Docker

The Docker container is built with the highest version of CUDA that the host version's Nvidia driver will support. In order to train/execute a model the code must either be explicitly copied into the container by adding an entry into the Dockerfile or by sharing a volume with your code to the container (see ./scripts/run.sh).

Example

The following is code for the example agent that executes a single command RotateRight.

from pprint import pprint
import ai2thor.controller


if __name__ == '__main__':
    controller = ai2thor.controller.Controller(scene='FloorPlan28')
    event = controller.step(action='RotateRight')
    pprint(event.metadata['agent'])

ai2thor-docker's People

Contributors

roozbehm avatar schmmd avatar sk1ll10 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.