Commit 86e974fd authored by Benjamin Beyret's avatar Benjamin Beyret
Browse files

add resolution for docker+change API version

parent 4917ed53
......@@ -154,7 +154,11 @@ v0.6.1)
## Version History
- v1.0
- v1.0.2
- Adds custom resolution for docker training as well
- fix version checker
- v1.0.0
- Adds custom resolution to both Unity and Gym environments
- Adds inference mode to the environment to visualize trained agents
- Prizes announced
......
......@@ -53,7 +53,7 @@ class UnityEnvironment(object):
self.resolution = resolution
self.port = base_port + worker_id
self._buffer_size = 12000
self._version_ = "0.6"
self._version_ = "1.0"
self._loaded = False # If true, this means the environment was successfully loaded
self.proc1 = None # The process that is started. If None, no process was started
self.communicator = self.get_communicator(worker_id, base_port)
......@@ -215,9 +215,17 @@ class UnityEnvironment(object):
launched, the arguments are passed to `xvfb-run`. `exec` replaces the shell
we created with `xvfb`.
"""
docker_ls = ("exec xvfb-run --auto-servernum"
" --server-args='-screen 0 640x480x24'"
" {0} --port {1} --nArenas {2}").format(launch_string, str(self.port), str(self.n_arenas))
if self.resolution:
docker_ls = ("exec xvfb-run --auto-servernum"
" --server-args='-screen 0 640x480x24'"
" {0} --port {1} --nArenas {2} --resolution {3}").format(launch_string, str(self.port),
str(self.n_arenas),
str(self.resolution))
else:
docker_ls = ("exec xvfb-run --auto-servernum"
" --server-args='-screen 0 640x480x24'"
" {0} --port {1} --nArenas {2}").format(launch_string, str(self.port),
str(self.n_arenas))
self.proc1 = subprocess.Popen(docker_ls,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
......
......@@ -2,7 +2,7 @@ from setuptools import setup
setup(
name='animalai',
version='1.0.0',
version='1.0.2',
description='Animal AI competition interface',
url='https://github.com/beyretb/AnimalAI-Olympics',
author='Benjamin Beyret',
......
......@@ -2,7 +2,7 @@ from setuptools import setup
setup(
name='animalai_train',
version='1.0.0',
version='1.0.2',
description='Animal AI competition training library',
url='https://github.com/beyretb/AnimalAI-Olympics',
author='Benjamin Beyret',
......@@ -20,7 +20,7 @@ setup(
zip_safe=False,
install_requires=[
'animalai>=1.0.0',
'animalai>=1.0.2',
'dopamine-rl',
'tensorflow==1.12.2',
'matplotlib',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment