Commit d224ac09 authored by Sascha Dewes's avatar Sascha Dewes

trying a modified version of the mxnet150 Dockerfile from EMADL2CPP

parent 109dab00
Pipeline #396068 failed with stages
in 11 minutes and 20 seconds
......@@ -10,21 +10,14 @@ buildDockerMXNetMaven:
script:
- cd docker
- docker login registry.git.rwth-aachen.de -u someUserName -p yEep-tAt19HbsmNQJMNo
- docker build -t registry.git.rwth-aachen.de/monticore/embeddedmontiarc/applications/reinforcement_learning/forestrl/mxnetmvn:v0.0.2 .
- docker push registry.git.rwth-aachen.de/monticore/embeddedmontiarc/applications/reinforcement_learning/forestrl/mxnetmvn:v0.0.2
- docker build -t registry.git.rwth-aachen.de/monticore/embeddedmontiarc/applications/reinforcement_learning/forestrl/mxnetmvn:v0.0.3 .
- docker push registry.git.rwth-aachen.de/monticore/embeddedmontiarc/applications/reinforcement_learning/forestrl/mxnetmvn:v0.0.3
only:
changes:
- docker/*
testDockerImage:
image: registry.git.rwth-aachen.de/monticore/embeddedmontiarc/applications/reinforcement_learning/forestrl/mxnetmvn:v0.0.2
stage: testimage
script:
- chmod +x install.sh
- ./install.sh
TestBuild:
image: registry.git.rwth-aachen.de/monticore/embeddedmontiarc/applications/reinforcement_learning/forestrl/mxnetmvn:v0.0.2
image: registry.git.rwth-aachen.de/monticore/embeddedmontiarc/applications/reinforcement_learning/forestrl/mxnetmvn:v0.0.3
stage: build
script:
- mvn clean install -s settings.xml
FROM ros:kinetic
RUN apt-get update
RUN apt-get install -y unzip g++
RUN apt-get install -y libopenblas-dev libhdf5-serial-dev
ENV PATH="/usr/lib/x86_64-linux-gnu/:${PATH}"
ENV ROS_HOME=/opt/ros/kinetic
CMD ["bash"]
# Essential
RUN apt-get install -y openjdk-8-jdk openjdk-8-jre gcc make cmake ninja-build git python2.7 python-dev python-numpy swig libboost-all-dev curl wget python-tk
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
RUN python get-pip.py
RUN pip install h5py numpy pyprind matplotlib
RUN apt-get install -y build-essential git ninja-build ccache
RUN apt-get install -y libopenblas-dev libblas-dev
RUN apt-get install -y liblapack-dev libopencv-dev
RUN apt-get install -y libarmadillo-dev cmake
RUN apt-get install -y python2.7 python-dev python-tk
RUN apt-get install -y python-numpy
RUN apt-get install -y python3-pip
RUN apt-get install -y swig unzip
RUN apt-get install -y libboost-all-dev
RUN apt-get install -y wget
# Maven
RUN apt-get install -y maven
# Armadillo
ADD armadillo-9.600.6.zip /root/armadillo.zip
RUN unzip /root/armadillo.zip -d /root/armadillo
RUN apt-get install -y libopenblas-dev liblapack-dev
RUN cd /root/armadillo/armadillo-9.600.6 && \
cmake . && \
make && \
make install
# MXNET
RUN apt-get install -y libopenblas-dev
RUN apt-get install -y libblas-dev liblapack-dev
RUN apt-get install -y build-essential
RUN apt-get install -y libopenblas-dev
RUN apt-get install -y libopencv-dev
RUN cd /root/armadillo/armadillo-9.600.6 && cmake . && make && make install
RUN git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet
RUN cd mxnet && git checkout tags/1.5.0 && git submodule update --recursive --init
RUN cd mxnet && mkdir build && cd build && cmake -DUSE_CPP_PACKAGE=1 -DUSE_CUDA=0 -GNinja .. && ninja
RUN cd mxnet && cp -r include/mxnet /usr/include/mxnet && cp -r cpp-package/include/mxnet-cpp /usr/include/ && cp -r 3rdparty/tvm/nnvm/include/nnvm /usr/include/ && cp -r 3rdparty/dmlc-core/include/dmlc /usr/include/
RUN pip install numpy==1.16.5 mxnet==1.5.0
RUN cp -r "$(dirname $(python -c 'import mxnet; print(mxnet.__file__)'))/libmxnet.so" /usr/lib
# Numpy Library
RUN rm -rf /usr/include/numpy && \
ln -s "$(python -c 'import numpy; print(numpy.get_include())')/numpy" /usr/include
RUN pip3 install --user --upgrade "cmake>=3.13.2"
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python get-pip.py
RUN pip install --user h5py matplotlib numpy==1.16.5 mxnet==1.5.1.post0
# Set Display for TKInter
RUN mkdir -p /root/.config/matplotlib
RUN echo "backend : Agg" > /root/.config/matplotlib/matplotlibrc
package forestrl.singlestep.postprocessor.controller.utilities;
component NextUpdateTestWrapper {
ports
in Q^{2, 22} siteinf,
out Z waittime;
instance NextUpdate(2, 22) update;
connect siteinf -> update.siteinf;
conncet update.waittime -> waittime;
}
package forestrl.singlestep.postprocessor.controller.utilities;
component SupplyMatrixTestWrapper {
ports
in Q^{2, 8} newjobinf,
in Q^{2, 22} siteinf,
out Q^{2, 2} supplymatrix;
instance SupplyMatrix(2, 8, 2, 22) supply;
connect newjobinf -> supply.newjobinf;
connect siteinf -> supply.siteinf;
connect supply.supplymatrix -> supplymatrix;
}
package forestrl.singlestep.preprocessor.utilities;
component RescaleStateTestWrapper {
ports
in Q time,
in Q money,
in Q^{2, 8} jobinf,
in Q^{2, 8} newjobinf,
in Q^{2, 22} siteinf,
in Q^{6} forwarder,
out Q rstime,
out Q rsmoney,
out Q^{2, 8} rsjobinf,
out Q^{2, 8} rsnewjobinf,
out Q^{2, 22} rssiteinf,
out Q^{6} rsforwarder;
instance RescaleState(2, 8, 2, 2, 22, 6) rescale;
connect time -> rescale.time;
connect money -> rescale.money;
connect jobinf -> rescale.jobinf;
connect newjobinf -> rescale.newjobinf;
connect siteinf -> rescale.siteinf;
connect forwarder -> rescale.forwarder;
connect rescale.rstime -> rstime;
connect rescale.rsmoney -> rsmoney;
connect rescale.rsjobinf -> rsjobinf;
connect rescale.rsnewjobinf -> rsnewjobinf;
connect rescale.rssiteinf -> rssiteinf;
connect rescale.rsforwarder -> rsforwarder;
}
package forestrl.singlestep.postprocessor.controller.utilities;
stream SupplyMatrixTest for SupplyMatrixTestWrapper {
// TESTS: (a job and a felling site are "compatible" iff they both have the same wood type and log length)
// 1: both jobs are compatible with site 1
// 2: job 1 is compatible with site 1 and job 2 is compatible with site 2
// 3: job 1 is compatible with site 1, but site 1 has no supply, job 2 is not compatible with any site
newjobinf: [0, 0, 2, 4, 100, 0, 0, 0; 0, 0, 2, 4, 200, 0, 0, 0] tick [0, 0, 2, 4, 100, 0, 0, 0; 0, 0, 3, 6, 200, 0, 0, 0] tick [0, 0, 2, 4, 100, 0, 0, 0; 0, 0, 3, 5, 200, 0, 0, 0];
siteinf: [0, 0, 2, 4, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; 0, 0, 3, 6, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] tick [0, 0, 2, 4, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; 0, 0, 3, 6, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] tick [0, 0, 2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; 0, 0, 3, 6, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
supplymatrix: [10, 10; 0, 0] tick [10, 0; 0, 20] tick [0, 0; 0, 0];
}
package forestrl.singlestep.preprocessor.utilities;
stream RescaleStateTest for RescaleStateTestWrapper {
// TESTS:
// 1: divide each value by the approximate upper limit defined for that variable, don't scale undefined values (-1)
time: 2000;
money: 25000;
jobinf: [32, 32, 3, 9, 300, 20000, 5, 20000; -1, -1, 1, 6, 150, 10000, 1, 2000];
newjobinf: [-1, -1, 3, 9, 300, 20000, 5, 20000; -1, -1, -1, -1, -1, -1, -1, -1];
siteinf: [32, 32, 3, 9, 300, 20000, 20000, 20000, 100, 100, 100, 45000, 45000, 20000, 20000, 20000, 45000, 45000, 45000, 45000, 45000, 45000; 8, 16, 2, 3, 30, 10000, 5000, 2000, 50, 25, 10, 9000, 9000, 10000, 10000, 10000, 9000, 9000, 9000, 450, 450, 450];
forwarder: [16; 16; 20000; 45; 20000; 5];
rstime: 0.1;
rsmoney: 0.5;
rsjobinf: [1, 1, 1, 1, 1, 1, 1, 1; -1, -1, 0.3333, 0.6667, 0.5, 0.5, 0.2, 0.1];
rsnewjobinf: [-1, -1, 1, 1, 1, 1, 1, 1; -1, -1, -1, -1, -1, -1, -1, -1];
rssiteinf: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; 0.25, 0.5, 0.6667, 0.3333, 0.1, 0.5, 0.25, 0.1, 0.5, 0.25, 0.1, 0.2, 0.2, 0.5, 0.5, 0.5, 0.2, 0.2, 0.2, 0.1, 0.1, 0.1];
rsforwarder: [0.5; 0.5; 1; 0.5; 1; 0.5];
}
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