Skip to content

Commit

Permalink
Add xpack.ml.use_auto_machine_memory_percent to docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkyle committed Oct 3, 2024
1 parent 091e242 commit 187f1cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/reference/setup/install/docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ docker run --name es01 --net elastic -p 9200:9200 -it -m 1GB {docker-image}
TIP: Use the `-m` flag to set a memory limit for the container. This removes the
need to <<docker-set-heap-size,manually set the JVM size>>.
+

Machine Learning features such as semantic search with the ELSER model
require a larger container with more than 1GB of memory.
If you intend to use the ML capabilities start the container with this command
[source,sh,subs="attributes"]
----
docker run --name es01 --net elastic -p 9200:9200 -it -m 6GB -e "xpack.ml.use_auto_machine_memory_percent=true" {docker-image}
----
The command prints the `elastic` user password and an enrollment token for {kib}.

. Copy the generated `elastic` password and enrollment token. These credentials
Expand Down
3 changes: 3 additions & 0 deletions docs/reference/setup/install/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ services:
- xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt
- xpack.security.transport.ssl.verification_mode=certificate
- xpack.license.self_generated.type=${LICENSE}
- xpack.ml.use_auto_machine_memory_percent=true
mem_limit: ${MEM_LIMIT}
ulimits:
memlock:
Expand Down Expand Up @@ -130,6 +131,7 @@ services:
- xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt
- xpack.security.transport.ssl.verification_mode=certificate
- xpack.license.self_generated.type=${LICENSE}
- xpack.ml.use_auto_machine_memory_percent=true
mem_limit: ${MEM_LIMIT}
ulimits:
memlock:
Expand Down Expand Up @@ -170,6 +172,7 @@ services:
- xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt
- xpack.security.transport.ssl.verification_mode=certificate
- xpack.license.self_generated.type=${LICENSE}
- xpack.ml.use_auto_machine_memory_percent=true
mem_limit: ${MEM_LIMIT}
ulimits:
memlock:
Expand Down

0 comments on commit 187f1cf

Please sign in to comment.