mirror of
https://github.com/facebookresearch/ReAgent.git
synced 2026-05-17 12:40:39 +00:00
Rebase exprtk, handle API change in pytorch, add libbtorch to cuda dockerfile (#210)
Summary: Fixes https://github.com/facebookresearch/ReAgent/issues/201 #208 Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/210 Reviewed By: czxttkl Differential Revision: D19724659 Pulled By: MisterTea fbshipit-source-id: a83535221ef603b2ba28a66aea0e837ed0ac8229
This commit is contained in:
committed by
Facebook Github Bot
parent
7a9d1fa4eb
commit
6d906571a9
@@ -1,4 +1,8 @@
|
||||
version: 2.1
|
||||
parameters:
|
||||
image-tag:
|
||||
type: string
|
||||
default: "reagent/reagent:gpu_test"
|
||||
|
||||
# How to test the Linux jobs:
|
||||
# - Install CircleCI local CLI: https://circleci.com/docs/2.0/local-cli/
|
||||
@@ -86,7 +90,7 @@ jobs:
|
||||
- run:
|
||||
name: Start docker
|
||||
command: |
|
||||
sudo docker run --runtime=nvidia --rm -itd -v $PWD:/home/ReAgent --ipc=host --name reagent czxttkl/reagent:gpu
|
||||
sudo docker run --runtime=nvidia --rm -itd -v $PWD:/home/ReAgent --ipc=host --name reagent << pipeline.parameters.image-tag >>
|
||||
- run:
|
||||
name: Run unittests
|
||||
command: |
|
||||
@@ -94,18 +98,17 @@ jobs:
|
||||
cd ReAgent && \
|
||||
scripts/ci/run_python_unittest.sh"
|
||||
|
||||
|
||||
workflows:
|
||||
build:
|
||||
jobs:
|
||||
- binary_linux_conda:
|
||||
name: linux_conda_py3.7_end_to_end
|
||||
docker_image: czxttkl/reagent:cpu
|
||||
docker_image: << pipeline.parameters.image-tag >>
|
||||
test_script: scripts/ci/run_end_to_end_test.sh
|
||||
resource_class_str: large
|
||||
- gpu_unittest
|
||||
- binary_linux_conda:
|
||||
name: linux_conda_py3.7_rasp_test
|
||||
docker_image: czxttkl/reagent:cpu
|
||||
docker_image: << pipeline.parameters.image-tag >>
|
||||
test_script: scripts/ci/run_rasp_test.sh
|
||||
resource_class_str: large
|
||||
|
||||
+21
-16
@@ -18,17 +18,18 @@ FROM nvidia/cuda:9.2-cudnn7-devel-ubuntu18.04
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
cmake \
|
||||
git \
|
||||
sudo \
|
||||
software-properties-common \
|
||||
vim \
|
||||
emacs \
|
||||
curl \
|
||||
wget \
|
||||
bc
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
cmake \
|
||||
git \
|
||||
sudo \
|
||||
software-properties-common \
|
||||
vim \
|
||||
emacs \
|
||||
curl \
|
||||
unzip \
|
||||
wget \
|
||||
bc
|
||||
|
||||
# Sometimes needed to avoid SSL CA issues.
|
||||
RUN update-ca-certificates
|
||||
@@ -38,9 +39,9 @@ WORKDIR ${HOME}/
|
||||
|
||||
# Not using latest version because of https://github.com/conda/conda/issues/8825
|
||||
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-4.7.12.1-Linux-x86_64.sh -O miniconda.sh && \
|
||||
chmod +x miniconda.sh && \
|
||||
./miniconda.sh -b -p ${HOME}/miniconda && \
|
||||
rm miniconda.sh
|
||||
chmod +x miniconda.sh && \
|
||||
./miniconda.sh -b -p ${HOME}/miniconda && \
|
||||
rm miniconda.sh
|
||||
|
||||
# Setting these env var outside of the install script to ensure
|
||||
# they persist in image
|
||||
@@ -68,13 +69,17 @@ RUN rm requirements.txt
|
||||
# Install open ai gym
|
||||
RUN pip install "gym[classic_control,box2d,atari]"
|
||||
|
||||
# Install libtorch
|
||||
RUN wget https://download.pytorch.org/libtorch/nightly/cpu/libtorch-cxx11-abi-shared-with-deps-latest.zip
|
||||
RUN unzip libtorch-cxx11-abi-shared-with-deps-latest.zip
|
||||
|
||||
# Set JAVA_HOME for Spark
|
||||
ENV JAVA_HOME ${HOME}/miniconda
|
||||
|
||||
# Install Spark
|
||||
RUN wget https://archive.apache.org/dist/spark/spark-2.3.3/spark-2.3.3-bin-hadoop2.7.tgz && \
|
||||
tar -xzf spark-2.3.3-bin-hadoop2.7.tgz && \
|
||||
mv spark-2.3.3-bin-hadoop2.7 /usr/local/spark
|
||||
tar -xzf spark-2.3.3-bin-hadoop2.7.tgz && \
|
||||
mv spark-2.3.3-bin-hadoop2.7 /usr/local/spark
|
||||
|
||||
# Caches dependencies so they do not need to be re-downloaded
|
||||
RUN mvn -f /tmp/pom.xml dependency:resolve
|
||||
|
||||
@@ -11,8 +11,12 @@ Here are the steps:
|
||||
.. code-block::
|
||||
|
||||
docker build -f docker/cpu.Dockerfile -t reagent:cpu .
|
||||
docker tag reagent:cpu kittipatv/reagent:cpu_test
|
||||
docker push kittipatv/reagent:cpu_test
|
||||
docker tag reagent:cpu reagent/reagent:cpu_test
|
||||
docker push reagent/reagent:cpu_test
|
||||
|
||||
docker build -f docker/cuda.Dockerfile -t reagent:gpu .
|
||||
docker tag reagent:gpu reagent/reagent:gpu_test
|
||||
docker push reagent/reagent:gpu_test
|
||||
|
||||
If you cannot push, you have to run ``docker login``.
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule serving/external/exprtk updated: a1b1854ee6...7c9b2370f8
@@ -75,6 +75,7 @@ StringDoubleMap PytorchActionValueScorer::predict(
|
||||
} catch (...) {
|
||||
LOG(FATAL) << "UNKNOWN ERROR";
|
||||
}
|
||||
LOG(FATAL) << "Should never get here";
|
||||
}
|
||||
|
||||
} // namespace reagent
|
||||
|
||||
Reference in New Issue
Block a user