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.

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