mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 09:52:38 +00:00
Make docker container memory a CLI argument
This commit is contained in:
parent
9489137e23
commit
5b1d454f2e
@ -286,6 +286,14 @@ if __name__ == "__main__":
|
||||
help="Set network driver for runnner container (defaults to `host`)",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--memory",
|
||||
# Default is host memory - 2GiB
|
||||
default=physical_memory() - 2 * 1024**3,
|
||||
help="Set the memory limit for the docker container, "
|
||||
"accepts the same argument as `docker run --memory`",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--docker-image-version",
|
||||
default="latest",
|
||||
@ -479,7 +487,7 @@ if __name__ == "__main__":
|
||||
cmd_base = (
|
||||
f"docker run {net} {tty} --rm --name {CONTAINER_NAME} "
|
||||
"--privileged --dns-search='.' " # since recent dns search leaks from host
|
||||
f"--memory={physical_memory() - 2 * 1024**3} "
|
||||
f"--memory={args.memory} "
|
||||
f"--volume={args.odbc_bridge_binary}:/clickhouse-odbc-bridge "
|
||||
f"--volume={args.binary}:/clickhouse "
|
||||
f"--volume={args.library_bridge_binary}:/clickhouse-library-bridge "
|
||||
|
Loading…
Reference in New Issue
Block a user