You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
3.2 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. FROM movesrwth/storm-basesystem:ubuntu-22.04 as build
  2. #COPY ./tempest-devel /opt/tempest
  3. #COPY ./tempest-py /opt/tempestpy
  4. COPY ./pycarl-2.0.4 /opt/pycarl
  5. COPY ./carl /opt/carl
  6. # RUN rm -r /opt/tempest/.git
  7. # RUN rm -r /opt/tempestpy/.git
  8. # RUN rm -r /opt/Minigrid2PRISM/.git
  9. RUN apt-get update
  10. RUN apt-get install -y python3.10
  11. # Specify number of threads to use for parallel compilation
  12. # This number can be set from the commandline with:
  13. # --build-arg no_threads=<value>
  14. ARG no_threads=6
  15. # Build carl
  16. RUN mkdir -p /opt/carl/build
  17. WORKDIR /opt/carl/build
  18. RUN cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_CLN_NUMBERS=ON -DUSE_GINAC=ON
  19. RUN make lib_carl -j $no_threads
  20. # Build tempest
  21. RUN git clone -b tempestpy_adaptions https://git.pranger.xyz/sp/tempest.git /opt/tempest
  22. RUN mkdir -p /opt/tempest/build
  23. WORKDIR /opt/tempest/build
  24. RUN cmake .. -DCMAKE_BUILD_TYPE=Release -DSTORM_DEVELOPER=OFF -DSTORM_LOG_DISABLE_DEBUG=ON -DSTORM_PORTABLE=OFF -DSTORM_USE_SPOT_SHIPPED=ON
  25. RUN make resources storm binaries -j $no_threads
  26. RUN apt-get install -y maven
  27. RUN apt-get install -y uuid-dev
  28. # COPY ./carl-parser /opt/carl-parser
  29. # # Switch to build directory
  30. # RUN mkdir -p /opt/carl-parser/build
  31. # WORKDIR /opt/carl-parser/build
  32. # Configure carl-parser
  33. RUN cmake .. -DCMAKE_BUILD_TYPE=$build_type
  34. # Build carl-parser
  35. # RUN make carl-parser -j $no_threads
  36. # Manage python packages
  37. WORKDIR /opt/
  38. RUN apt-get install -y python3-venv
  39. # Python env handling
  40. ENV VIRTUAL_ENV=/opt/venv
  41. RUN python3 -m venv $VIRTUAL_ENV
  42. ENV PATH="$VIRTUAL_ENV/bin:$PATH"
  43. RUN apt-get install -y python3-pip
  44. # build pycarl
  45. WORKDIR /opt/pycarl
  46. RUN python setup.py build_ext -j $no_threads
  47. RUN pip install .
  48. # build tempestpy
  49. RUN git clone -b refactoring https://git.pranger.xyz/sp/tempestpy.git /opt/tempestpy
  50. WORKDIR /opt/tempestpy
  51. RUN python3 setup.py build_ext --storm-dir /opt/tempest/ -j $no_threads develop
  52. # build yaml-cpp
  53. COPY ./yaml-cpp /opt/yaml-cpp
  54. RUN mkdir -p /opt/yaml-cpp/build
  55. WORKDIR /opt/yaml-cpp/build
  56. RUN cmake .. -DCMAKE_BUILD_TYPE=Release
  57. RUN make -j $no_threads
  58. RUN make install -j $no_threads
  59. COPY ./Minigrid2PRISM /opt/Minigrid2PRISM
  60. # build minigrid to prism
  61. RUN mkdir -p /opt/Minigrid2PRISM/build
  62. WORKDIR /opt/Minigrid2PRISM/build
  63. RUN cmake ..
  64. RUN make -j $no_threads
  65. # build minigrid
  66. #COPY ./Minigrid /opt/Minigrid
  67. #RUN rm -r /opt/Minigrid/.git
  68. #WORKDIR /opt/Minigrid
  69. #RUN pip install .
  70. RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
  71. WORKDIR /opt/tempestpy
  72. RUN pip install -U "ray[all]==2.6.3"
  73. RUN pip install dm-tree
  74. RUN pip install opencv-python
  75. RUN pip install scikit-image
  76. RUN pip install torch
  77. RUN pip install tensorboard
  78. RUN pip install tensorboardX
  79. RUN pip install gymnasium
  80. RUN pip install tensorflow
  81. RUN pip install jupyterlab
  82. RUN pip install astar
  83. RUN pip install ipywidgets
  84. RUN pip install numpy
  85. RUN pip install matplotlib
  86. RUN pip install sb3-contrib
  87. RUN pip install opencv-python
  88. RUN pip install moviepy
  89. ENV M2P_BINARY=/opt/Minigrid2PRISM/build/main
  90. # We mount the Minigrid directory here manually again, to be able to have the directory hosted in the jupyter notebook
  91. CMD ["pip", "install", "-e", "/opt/Minigrid"]
  92. ENTRYPOINT ["jupyter", "lab","--ip=0.0.0.0","--allow-root", "--notebook-dir=/opt/notebooks"]