Skip to content

Commit 4ac8f31

Browse files
committed
update dockerfiles
1 parent 003e5db commit 4ac8f31

5 files changed

Lines changed: 19 additions & 8 deletions

File tree

Docker/Dockerfile-ORESWIG

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,7 @@ RUN mkdir oreswig
3939
RUN mv /swig/OREAnalytics-SWIG/Python/build.release/ORE.py oreswig \
4040
&& mv /swig/OREAnalytics-SWIG/Python/build.release/_ORE.so oreswig
4141

42-
ENV PYTHONPATH=/oreswig
42+
ENV PYTHONPATH=/oreswig
43+
44+
WORKDIR /swig/OREAnalytics-SWIG/Python/Examples
45+
RUN ./runExamples.sh

Docker/Dockerfile-ORESWIG-App

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ RUN apt-get update \
1212
&& apt-get clean \
1313
&& rm -rf /var/lib/apt/lists/*
1414

15+
RUN pip3 install matplotlib pandas nose nose_xunitmp datacompy
16+
1517
WORKDIR /
1618
RUN mkdir /oreswig
1719
RUN mkdir /oreswig/pythonlib
@@ -26,14 +28,18 @@ RUN true
2628
COPY --from=env_ore /usr/local/lib /usr/local/lib
2729

2830
ENV PYTHONPATH=/oreswig/pythonlib
31+
ENV LD_LIBRARY_PATH=/usr/local/lib
2932

3033
RUN mkdir /oreswig/tests
3134

3235
COPY oreswig/QuantLib-SWIG/Python/test /oreswig/tests/QuantLibTestSuite
36+
# Delete the init.py otherwise nosetest will not pick up all the tests
37+
RUN rm oreswig/tests/QuantLibTestSuite/__init__.py
3338
COPY oreswig/OREAnalytics-SWIG/Python/test /oreswig/tests/ORETestSuite
34-
COPY oreswig/OREAnalytics-SWIG/Python/Examples /oreswig/examples
35-
COPY ore/Examples /oreswig/ORE-Examples
36-
39+
COPY oreswig/OREAnalytics-SWIG/Python/Examples /oreswig/example_scripts
40+
COPY ore/Examples /oreswig/Examples
41+
COPY ore/Tools /oreswig/Tools
42+
# Set env variable to run the ore examples with the python interface instead of the executable
3743
ENV ORE_EXAMPLES_USE_PYTHON=1
3844

3945
CMD bash

Docker/DockerfileRunORE.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
2-
#COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose --env-file ore/Docker/.env -f oreswig/Docker/docker-compose-oreswig.yml build || exit 1
2+
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose --env-file ore/Docker/.env -f oreswig/Docker/docker-compose-oreswig.yml build || exit 1
33
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose --env-file ore/Docker/.env -f oreswig/Docker/docker-compose-oreswig-app.yml build || exit 1
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
echo RUN commodityforward.py
3+
python3 commodityforward.py
4+
python3 conventions.py

OREAnalytics-SWIG/Python/test/testrunner.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@
66
sys.modules["QuantLib"] = ORE
77

88
if __name__=="__main__":
9-
folder = sys.argv[1]
10-
argv = [__file__, "-w ", folder, '--with-xunit']
11-
nose.run(argv=argv)
9+
nose.run()

0 commit comments

Comments
 (0)