@@ -5,6 +5,8 @@ import Tabs from '@theme/Tabs';
55import TabItem from ' @theme/TabItem' ;
66import {os2 } from ' @site/src/helpers/os.ts' ;
77import BrowserOnly from ' @docusaurus/BrowserOnly' ;
8+ import Details from ' @theme/Details' ;
9+ import CodeBlock from ' @theme/CodeBlock' ;
810
911# Setup
1012
@@ -20,14 +22,36 @@ The container also functions as a Remote Desktop Server (RDP) with preconfigured
2022
2123## Build docker image
2224
23- Change directory to the repository. Expected location is ` .../ProbabilisticGraphQuery$ `
25+ In this repository, the ` devenv ` folder contains scripts and source files to recreate the development and measurement environment.
26+
27+ <Details summary = " Dockerfile for the environment" >
28+ import Dockerfile from ' !!../../src/helpers/partial-loader!!@site/../devenv/dockerfile' ;
29+
30+ <CodeBlock language = " c" >{ Dockerfile } </CodeBlock >
31+ </Details >
32+
33+
34+ Before cuntinuing, ensure that the current working driectory is ` devenv ` od the repository. (` ProbabilisticGraphQuery/devenv ` )
2435
2536Build your own docker image with the following command:
26- ```
27- docker build -t pgq-devenv devenv/dockerfile
28- ```
37+
38+
39+ <Tabs groupId = " os" >
40+ <TabItem value = " win" label = " Windows" >
41+ import BuildWin from ' !!../../src/helpers/partial-loader?lines=5-*!!@site/../devenv/build.bat' ;
42+
43+ <CodeBlock language = " bash" >{ BuildWin } </CodeBlock >
44+ </TabItem >
45+ <TabItem value = " linux" label = " Posix" >
46+ ``` bash
47+ docker build -t pgq-devenv dockerfile
48+ ```
49+ </TabItem >
50+ </Tabs >
51+
2952:::tip[ Note]
30- Downloading eclipse takes a lot of time. Be patient, or download the eclipse instance manually and replace ` RUN wget 'https://www.eclipse.org/downloads ... ` with ` COPY <your file> eclipse.tar.gz `
53+ * Downloading eclipse takes a lot of time. Be patient, or download the eclipse instance manually and replace ` RUN wget 'https://www.eclipse.org/downloads ... ` with ` COPY <your file> eclipse.tar.gz `
54+ * Building storm model checker can take up to an hour. It also takes significant memory to compile. To lower resource usage, adjust the ` make -j12 ` flag in the dockerfile to use less CPU cores.
3155:::
3256
3357Alternatively, import the image using the following command:
@@ -39,52 +63,53 @@ docker image load -i <my image file>
3963## Create container
4064
4165Create container with the following command.
42- <Tabs groupId = " data" >
43- <TabItem value = " posix" label = " Linux" >
66+ <Tabs groupId = " os" >
67+ <TabItem value = " win" label = " Windows" >
68+ import InitWin from ' !!../../src/helpers/partial-loader?lines=5-*!!@site/../devenv/init.bat' ;
69+
70+ <CodeBlock language = " bash" >{ InitWin } </CodeBlock >
71+ </TabItem >
72+ <TabItem value = " linux" label = " Posix" >
4473 ```
4574 docker run -d -u root \
46- --name=pgq-devenv \
75+ --name=pgq-devenv-storm \
4776 --security-opt seccomp=unconfined \
4877 -p 4100:3389 \
4978 --shm-size="1gb" \
5079 -v $(pwd):/config/ProbabilisticGraphQuery \
5180 pgq-devenv
5281 ```
5382 </TabItem >
54- <TabItem value = " win" label = " Windows" >
55- ```
56- docker run -d -u root ^
57- --name=pgq-devenv ^
58- --security-opt seccomp=unconfined ^
59- -p 4100:3389 ^
60- --shm-size="1gb" ^
61- -v $(pwd):/config/ProbabilisticGraphQuery ^
62- pgq-devenv
63- ```
64- </TabItem >
83+
6584</Tabs >
6685
6786(Delayed) You can stop the container with:
6887```
69- docker container stop pgq-devenv
88+ docker container stop pgq-devenv-storm
7089```
7190(Delayed) You can restart the container with:
7291```
73- docker container start pgq-devenv
92+ docker container start pgq-devenv-storm
7493```
7594:::tip[ Note]
7695If you use ` docker exec ` , don't forget to set the user to ` abc ` .
7796```
78- docker exec -u abc -it -w /config pgq-devenv /bin/bash
97+ docker exec -u abc -it -w /config pgq-devenv-storm /bin/bash
7998```
8099:::
81100
82101## Configuring container
83102
103+ ### Download compile runtime dependencies
104+
105+ ```
106+ docker exec -u abc -w /config/ProbabilisticGraphQuery/sources/hu.bme.mit.delta.api/libs/ pgq-devenv-storm ./download.sh
107+ docker exec -u abc -w /config/ProbabilisticGraphQuery/sources/hu.bme.mit.inf.measurement.utilities/libs/ pgq-devenv-storm ./download.sh
108+ ```
109+
110+ ### Configure editor
111+
84112* Connect to the running container from an RDP client (address: ` localhost:4100 ` , username: ` abc ` , password: ` abc ` )
85- * Donload jar dependencies.
86- * ` /config/ProbabilisticGraphQuery/sources/hu.bme.mit.delta.api/libs/download.sh `
87- * ` /config/ProbabilisticGraphQuery/sources/hu.bme.mit.inf.measurement.utilities/libs/download.sh `
88113* Launch Eclipse from ` Applications -> Development -> Modeling 2024-03 `
89114* Pick a workplace. (Any directory works, but we recommend picking ` /config/ProbabilisticGraphQuery/devenv/workplace ` )
90115* Import all projects from ` /config/ProbabilisticGraphQuery/sources ` (` File -> Import -> General -> Existing Projects into Workspace -> Next -> Select root directory -> /config/ProbabilisticGraphQuery/sources -> Projects -> Select All -> Finish ` )
0 commit comments