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.

119 lines
3.0 KiB

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