Andrew Cohen
4 年前
当前提交
e5f14400
共有 216 个文件被更改,包括 1771 次插入 和 848 次删除
-
12.circleci/config.yml
-
4.github/workflows/pre-commit.yml
-
47.yamato/com.unity.ml-agents-promotion.yml
-
14.yamato/com.unity.ml-agents-test.yml
-
3.yamato/gym-interface-test.yml
-
3.yamato/python-ll-api-test.yml
-
9.yamato/standalone-build-test.yml
-
8.yamato/training-int-tests.yml
-
5DevProject/ProjectSettings/EditorBuildSettings.asset
-
159Dockerfile
-
26Project/Assets/ML-Agents/Examples/3DBall/Prefabs/3DBall.prefab
-
19Project/Assets/ML-Agents/Examples/3DBall/Scenes/3DBall.unity
-
14Project/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs
-
23Project/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticVariableSpeed.unity
-
154Project/Assets/ML-Agents/Examples/FoodCollector/Prefabs/VisualFoodCollectorArea.prefab
-
73Project/Assets/ML-Agents/Examples/FoodCollector/Scenes/VisualFoodCollector.unity
-
8Project/Assets/ML-Agents/Examples/FoodCollector/Scripts/FoodCollectorAgent.cs
-
125Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs
-
10README.md
-
1com.unity.ml-agents.extensions/Documentation~/Grid-Sensor.md
-
31com.unity.ml-agents.extensions/Documentation~/com.unity.ml-agents.extensions.md
-
4com.unity.ml-agents.extensions/README.md
-
4com.unity.ml-agents.extensions/Runtime/Sensors/GridSensor.cs
-
2com.unity.ml-agents.extensions/package.json
-
38com.unity.ml-agents/CHANGELOG.md
-
2com.unity.ml-agents/Documentation~/com.unity.ml-agents.md
-
1com.unity.ml-agents/Editor/CameraSensorComponentEditor.cs
-
1com.unity.ml-agents/Editor/RenderTextureSensorComponentEditor.cs
-
49com.unity.ml-agents/Runtime/Academy.cs
-
2com.unity.ml-agents/Runtime/Actuators/IActionReceiver.cs
-
2com.unity.ml-agents/Runtime/Actuators/IDiscreteActionMask.cs
-
26com.unity.ml-agents/Runtime/Agent.cs
-
62com.unity.ml-agents/Runtime/Communicator/GrpcExtensions.cs
-
4com.unity.ml-agents/Runtime/Communicator/UnityRLCapabilities.cs
-
2com.unity.ml-agents/Runtime/Demonstrations/DemonstrationRecorder.cs
-
2com.unity.ml-agents/Runtime/DiscreteActionMasker.cs
-
40com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Capabilities.cs
-
34com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Observation.cs
-
64com.unity.ml-agents/Runtime/SensorHelper.cs
-
2com.unity.ml-agents/Runtime/Sensors/CameraSensor.cs
-
28com.unity.ml-agents/Runtime/Sensors/CameraSensorComponent.cs
-
52com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs
-
2com.unity.ml-agents/Runtime/Sensors/RenderTextureSensor.cs
-
28com.unity.ml-agents/Runtime/Sensors/RenderTextureSensorComponent.cs
-
198com.unity.ml-agents/Runtime/Sensors/StackingSensor.cs
-
47com.unity.ml-agents/Runtime/Utilities.cs
-
31com.unity.ml-agents/Tests/Editor/Communicator/GrpcExtensionsTests.cs
-
156com.unity.ml-agents/Tests/Editor/Sensor/StackingSensorTests.cs
-
10com.unity.ml-agents/Tests/Editor/Sensor/VectorSensorTests.cs
-
4com.unity.ml-agents/Tests/Runtime/RuntimeAPITest.cs
-
2com.unity.ml-agents/package.json
-
4docs/Installation-Anaconda-Windows.md
-
6docs/Installation.md
-
4docs/Learning-Environment-Create-New.md
-
2docs/Learning-Environment-Design-Agents.md
-
10docs/Learning-Environment-Examples.md
-
24docs/ML-Agents-Overview.md
-
16docs/Migrating.md
-
13docs/Training-Configuration-File.md
-
2docs/Training-on-Amazon-Web-Service.md
-
4docs/Unity-Inference-Engine.md
-
2gym-unity/gym_unity/__init__.py
-
4gym-unity/setup.py
-
2ml-agents-envs/mlagents_envs/__init__.py
-
11ml-agents-envs/mlagents_envs/communicator_objects/capabilities_pb2.py
-
6ml-agents-envs/mlagents_envs/communicator_objects/capabilities_pb2.pyi
-
19ml-agents-envs/mlagents_envs/communicator_objects/observation_pb2.py
-
6ml-agents-envs/mlagents_envs/communicator_objects/observation_pb2.pyi
-
4ml-agents-envs/mlagents_envs/environment.py
-
81ml-agents-envs/mlagents_envs/rpc_utils.py
-
76ml-agents-envs/mlagents_envs/tests/test_rpc_utils.py
-
4ml-agents-envs/setup.py
-
7ml-agents/mlagents/torch_utils/cpu_utils.py
-
2ml-agents/mlagents/trainers/__init__.py
-
9ml-agents/mlagents/trainers/buffer.py
-
12ml-agents/mlagents/trainers/environment_parameter_manager.py
-
5ml-agents/mlagents/trainers/learn.py
-
3ml-agents/mlagents/trainers/model_saver/tf_model_saver.py
-
4ml-agents/mlagents/trainers/optimizer/tf_optimizer.py
-
10ml-agents/mlagents/trainers/policy/checkpoint_manager.py
-
7ml-agents/mlagents/trainers/policy/torch_policy.py
-
2ml-agents/mlagents/trainers/ppo/trainer.py
-
151ml-agents/mlagents/trainers/sac/optimizer_torch.py
-
6ml-agents/mlagents/trainers/sac/trainer.py
-
38ml-agents/mlagents/trainers/settings.py
-
2ml-agents/mlagents/trainers/tests/test_learn.py
-
8ml-agents/mlagents/trainers/tests/test_rl_trainer.py
-
16ml-agents/mlagents/trainers/tests/test_settings.py
-
10ml-agents/mlagents/trainers/tests/test_subprocess_env_manager.py
-
1ml-agents/mlagents/trainers/tests/test_trainer_controller.py
-
27ml-agents/mlagents/trainers/tests/test_trainer_util.py
-
24ml-agents/mlagents/trainers/tests/test_training_status.py
-
4ml-agents/mlagents/trainers/tests/torch/saver/test_saver.py
-
20ml-agents/mlagents/trainers/tests/torch/saver/test_saver_reward_providers.py
-
10ml-agents/mlagents/trainers/tests/torch/test_policy.py
-
12ml-agents/mlagents/trainers/tests/torch/test_ppo.py
-
10ml-agents/mlagents/trainers/tests/torch/test_sac.py
-
253ml-agents/mlagents/trainers/tests/torch/test_simple_rl.py
-
17ml-agents/mlagents/trainers/tests/torch/test_utils.py
-
2ml-agents/mlagents/trainers/torch/components/bc/module.py
|
|||
# Based off of python:3.6-slim, except that we are using ubuntu instead of debian. |
|||
FROM ubuntu:16.04 |
|||
|
|||
|
|||
# ensure local python is preferred over distribution python |
|||
ENV PATH /usr/local/bin:$PATH |
|||
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04 |
|||
# http://bugs.python.org/issue19846 |
|||
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. |
|||
ENV LANG C.UTF-8 |
|||
RUN yes | unminimize |
|||
# runtime dependencies |
|||
RUN apt-get update && apt-get install -y --no-install-recommends \ |
|||
ca-certificates \ |
|||
libexpat1 \ |
|||
libffi6 \ |
|||
libgdbm3 \ |
|||
libreadline6 \ |
|||
libsqlite3-0 \ |
|||
libssl1.0.0 \ |
|||
&& rm -rf /var/lib/apt/lists/* |
|||
RUN echo "deb http://packages.cloud.google.com/apt cloud-sdk-xenial main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list |
|||
RUN wget https://packages.cloud.google.com/apt/doc/apt-key.gpg && apt-key add apt-key.gpg |
|||
RUN apt-get update && \ |
|||
apt-get install -y --no-install-recommends wget curl tmux vim git gdebi-core \ |
|||
build-essential python3-pip unzip google-cloud-sdk htop mesa-utils xorg-dev xorg \ |
|||
libglvnd-dev libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev && \ |
|||
wget http://security.ubuntu.com/ubuntu/pool/main/libx/libxfont/libxfont1_1.5.1-1ubuntu0.16.04.4_amd64.deb && \ |
|||
wget http://security.ubuntu.com/ubuntu/pool/universe/x/xorg-server/xvfb_1.18.4-0ubuntu0.10_amd64.deb && \ |
|||
yes | gdebi libxfont1_1.5.1-1ubuntu0.16.04.4_amd64.deb && \ |
|||
yes | gdebi xvfb_1.18.4-0ubuntu0.10_amd64.deb |
|||
RUN python3 -m pip install --upgrade pip |
|||
RUN pip install setuptools==41.0.0 |
|||
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D |
|||
ENV PYTHON_VERSION 3.6.4 |
|||
ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH |
|||
RUN set -ex \ |
|||
&& buildDeps=" \ |
|||
dpkg-dev \ |
|||
gcc \ |
|||
libbz2-dev \ |
|||
libc6-dev \ |
|||
libexpat1-dev \ |
|||
libffi-dev \ |
|||
libgdbm-dev \ |
|||
liblzma-dev \ |
|||
libncursesw5-dev \ |
|||
libreadline-dev \ |
|||
libsqlite3-dev \ |
|||
libssl-dev \ |
|||
make \ |
|||
tcl-dev \ |
|||
tk-dev \ |
|||
wget \ |
|||
xz-utils \ |
|||
zlib1g-dev \ |
|||
# as of Stretch, "gpg" is no longer included by default |
|||
$(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ |
|||
" \ |
|||
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ |
|||
\ |
|||
&& wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ |
|||
&& wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ |
|||
&& export GNUPGHOME="$(mktemp -d)" \ |
|||
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ |
|||
&& gpg --batch --verify python.tar.xz.asc python.tar.xz \ |
|||
&& rm -rf "$GNUPGHOME" python.tar.xz.asc \ |
|||
&& mkdir -p /usr/src/python \ |
|||
&& tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ |
|||
&& rm python.tar.xz \ |
|||
\ |
|||
&& cd /usr/src/python \ |
|||
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ |
|||
&& ./configure \ |
|||
--build="$gnuArch" \ |
|||
--enable-loadable-sqlite-extensions \ |
|||
--enable-shared \ |
|||
--with-system-expat \ |
|||
--with-system-ffi \ |
|||
--without-ensurepip \ |
|||
&& make -j "$(nproc)" \ |
|||
&& make install \ |
|||
&& ldconfig \ |
|||
\ |
|||
&& apt-get purge -y --auto-remove $buildDeps \ |
|||
\ |
|||
&& find /usr/local -depth \ |
|||
\( \ |
|||
\( -type d -a \( -name test -o -name tests \) \) \ |
|||
-o \ |
|||
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ |
|||
\) -exec rm -rf '{}' + \ |
|||
&& rm -rf /usr/src/python |
|||
|
|||
# make some useful symlinks that are expected to exist |
|||
RUN cd /usr/local/bin \ |
|||
&& ln -s idle3 idle \ |
|||
&& ln -s pydoc3 pydoc \ |
|||
&& ln -s python3 python \ |
|||
&& ln -s python3-config python-config |
|||
|
|||
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'" |
|||
ENV PYTHON_PIP_VERSION 9.0.3 |
|||
|
|||
RUN set -ex; \ |
|||
\ |
|||
apt-get update; \ |
|||
apt-get install -y --no-install-recommends wget; \ |
|||
rm -rf /var/lib/apt/lists/*; \ |
|||
\ |
|||
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ |
|||
\ |
|||
apt-get purge -y --auto-remove wget; \ |
|||
\ |
|||
python get-pip.py \ |
|||
--disable-pip-version-check \ |
|||
--no-cache-dir \ |
|||
"pip==$PYTHON_PIP_VERSION" \ |
|||
; \ |
|||
pip --version; \ |
|||
\ |
|||
find /usr/local -depth \ |
|||
\( \ |
|||
\( -type d -a \( -name test -o -name tests \) \) \ |
|||
-o \ |
|||
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ |
|||
\) -exec rm -rf '{}' +; \ |
|||
rm -f get-pip.py |
|||
|
|||
|
|||
RUN apt-get update && apt-get -y upgrade |
|||
|
|||
# xvfb is used to do CPU based rendering of Unity |
|||
RUN apt-get install -y xvfb |
|||
|
|||
# Install ml-agents-envs package locally |
|||
COPY ml-agents-envs /ml-agents-envs |
|||
WORKDIR /ml-agents-envs |
|||
RUN pip install -e . |
|||
|
|||
# Install ml-agents package next |
|||
COPY ml-agents /ml-agents |
|||
#checkout ml-agents for SHA |
|||
RUN mkdir /ml-agents |
|||
RUN pip install -e . |
|||
|
|||
# Port 5004 is the port used in Editor training. |
|||
# Environments will start from port 5005, |
|||
# so allow enough ports for several environments. |
|||
EXPOSE 5004-5050 |
|||
|
|||
ENTRYPOINT ["xvfb-run", "--auto-servernum", "--server-args='-screen 0 640x480x24'", "mlagents-learn"] |
|||
ARG SHA |
|||
RUN git init |
|||
RUN git remote add origin https://github.com/Unity-Technologies/ml-agents.git |
|||
RUN git fetch --depth 1 origin $SHA |
|||
RUN git checkout FETCH_HEAD |
|||
RUN pip install -e /ml-agents/ml-agents-envs |
|||
RUN pip install -e /ml-agents/ml-agents |
|
|||
# ML-Agents Extensions |
|||
|
|||
This is a source-only package for new features based on ML-Agents. |
|||
|
|||
More details coming soon. |
|||
See the [package documentation](Documentation~/com.unity.ml-agents.extensions.md) for more information |