diff --git a/docs/contributing.md b/docs/contributing.md index 3985d92539..e6b0747422 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -242,6 +242,3 @@ release!). Contributions are certainly not limited to these suggestions! of value iteration does not support simultaneous move games despite having the necessary LP-solving routines needed. This is a simple change to support solving simultaneous-move games. - -- **Windows Support**. We would like to officially support Windows, if - possible. diff --git a/docs/install.md b/docs/install.md index 9fd137bf26..07336eae31 100644 --- a/docs/install.md +++ b/docs/install.md @@ -1,5 +1,8 @@ # Installation +The instructions here are for Linux and MacOS. For installation on Windows, see +[these separate installation instructions](windows.md). + ## Summary 1. Install system packages and download some dependencies. Only needs to be diff --git a/docs/intro.md b/docs/intro.md index c8da34875a..06bb1650a2 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -38,8 +38,5 @@ available from Python. **Platforms** -OpenSpiel has been tested on Linux (Debian 10 and Ubuntu 19.04). We have not -tested on MacOS or Windows, but since the code uses freely available tools which -are also available on MacOS and Windows, we do not anticipate any (major) -problems compiling and running under those platforms. Patches and instructions -would be much appreciated. +OpenSpiel has been tested on Linux (Debian 10 and Ubuntu 19.04), MacOS, and +[Windows 10 (through Windows Subsystem for Linux)](windows.md). diff --git a/docs/windows.md b/docs/windows.md new file mode 100644 index 0000000000..e7578bf9a6 --- /dev/null +++ b/docs/windows.md @@ -0,0 +1,79 @@ +# Windows Installation using Windows Subsystem for Linux (WSL) + +## Purpose of this document + +Defines the installation steps to get OpenSpiel running in a Windows 10 +environment using WSL. Note that WSL does not include GPU support, so will run +on CPU only. + +## Process + +This process has been written for Windows 10, and tested on Windows 10 build +1903 (March 2019). + +1. Install the Windows Subsystem for Linux: + + Run the following command in Windows Powershell: + + ``` + Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux + ``` + +2. Install Ubuntu Linux from the Windows Store. Currently this is version + 18.04:: + + Open up the Windows Store. Search for Ubuntu. Open up Ubuntu and press "Get" + to install this. + +3. First time run of Ubuntu: + + Click on the Start Button and choose the Ubuntu icon. Wait until the distro + installs. Provide a username and password for the default user account. Note + that this account is a member of the Linux administrators (sudo) group so + choose a secure username and password combination. + +4. Update / Upgrade packages (optional step) + + ``` + sudo apt-get update + sudo apt-get upgrade + ``` + +5. Run through the first part of the OpenSpiel installation + + ``` + git clone https://github.com/deepmind/open_spiel.git + cd open_spiel + ./install.sh # you will be prompted for the password created at stage 3. Press Y to continue and install. During installation press Yes to restart services during package upgrades + pip3 install --upgrade -r requirements.txt # Install Python dependenciesmake + + ``` + +6. Now need to upgrade make version as the version of make which comes with + Ubuntu 18.04 is not high enough to build OpenSpiel. (Note, this step won't + be necessary if the version of Ubuntu in the Windows store gets upgraded to + 19.04) + + ``` + cd .. + wget http://www.cmake.org/files/v3.12/cmake-3.12.4.tar.gz + tar -xvzf cmake-3.12.4.tar.gz + cd cmake-3.12.4/ + ./configure + make + sudo make install + sudo update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force + cd ../open_spiel + + ``` + +7. Finally, continue with the installation and run tests. + + ``` + mkdir build + cd build + # Note: Python version installed should be >= Python_TARGET_VERSION specified here + CXX=g++ cmake -DPython_TARGET_VERSION=3.6 -DCMAKE_CXX_COMPILER=g++ ../open_spiel + make -j12 # The 12 here is the number of parallel processes used to build + ctest -j12 # Run the tests to verify that the installation succeeded + ```