diff --git a/.circleci/config.yml b/.circleci/config.yml index cd7ee556..a333617e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/docker/cuda.Dockerfile b/docker/cuda.Dockerfile index f6863b77..9acd8a38 100644 --- a/docker/cuda.Dockerfile +++ b/docker/cuda.Dockerfile @@ -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 diff --git a/docs/continuous_integration.rst b/docs/continuous_integration.rst index cee53e80..c168c098 100644 --- a/docs/continuous_integration.rst +++ b/docs/continuous_integration.rst @@ -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``. diff --git a/serving/external/exprtk b/serving/external/exprtk index a1b1854e..7c9b2370 160000 --- a/serving/external/exprtk +++ b/serving/external/exprtk @@ -1 +1 @@ -Subproject commit a1b1854ee6206869f0e693929f41469daf7b901c +Subproject commit 7c9b2370f80f2145e91edfc481c916ff5d1260d7 diff --git a/serving/reagent/serving/core/PytorchActionValueScorer.cpp b/serving/reagent/serving/core/PytorchActionValueScorer.cpp index 7805a9a3..8904e636 100644 --- a/serving/reagent/serving/core/PytorchActionValueScorer.cpp +++ b/serving/reagent/serving/core/PytorchActionValueScorer.cpp @@ -75,6 +75,7 @@ StringDoubleMap PytorchActionValueScorer::predict( } catch (...) { LOG(FATAL) << "UNKNOWN ERROR"; } + LOG(FATAL) << "Should never get here"; } } // namespace reagent