Skip to content

Commit 7895e28

Browse files
committed
Update Docker instructions
1 parent 6fab847 commit 7895e28

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ It is also possible to pass a parameter file:
169169
```
170170

171171
### Docker images
172+
172173
SNB Datagen images are available via [Docker Hub](https://hub.docker.com/orgs/ldbc/repositories).
173174
The image tags follow the pattern `${DATAGEN_VERSION/+/-}-${PLATFORM_VERSION}`, e.g `ldbc/datagen-standalone:0.5.0-2.12_spark3.2`.
174175

@@ -178,18 +179,29 @@ When building images ensure that you [use BuildKit](https://docs.docker.com/deve
178179

179180
The standalone image bundles Spark with the JAR and Python helpers, so you can run a workload in a container similarly to a local run, as you can
180181
see in this example:
182+
181183
```bash
182-
mkdir -p out_sf0.003_interactive # create output directory
184+
export SF=0.003
185+
mkdir -p out_sf${SF}_bi # create output directory
183186
docker run \
184-
--mount type=bind,source="$(pwd)"/out_sf0.003_interactive,target=/out \
187+
--mount type=bind,source="$(pwd)"/out_sf${SF}_bi,target=/out \
185188
--mount type=bind,source="$(pwd)"/conf,target=/conf,readonly \
186189
-e SPARK_CONF_DIR=/conf \
187-
ldbc/datagen-standalone:${DATAGEN_VERSION/+/-}-${PLATFORM_VERSION} --parallelism 1 -- --format csv --scale-factor 0.003 --mode interactive
190+
ldbc/datagen-standalone:${DATAGEN_VERSION/+/-}-${PLATFORM_VERSION} \
191+
--parallelism 1 \
192+
-- \
193+
--format csv \
194+
--scale-factor ${SF} \
195+
--mode bi \
196+
--generate-factors
188197
```
189198

190199
The standalone Docker image can be built with the provided Dockerfile. To build, execute the following command from the repository directory:
191200

192201
```bash
202+
export PLATFORM_VERSION=$(sbt -batch -error 'print platformVersion')
203+
export DATAGEN_VERSION=$(sbt -batch -error 'print version')
204+
export DOCKER_BUILDKIT=1
193205
docker build . --target=standalone -t ldbc/datagen-standalone:${DATAGEN_VERSION/+/-}-${PLATFORM_VERSION}
194206
```
195207

0 commit comments

Comments
 (0)