docker pull milvusdb/milvus:cpu-latest

    1. docker run -d --name milvus_cpu -p 19530:19530 -p 19121:19121 --link mysql1 \
    2. -v /Users/gaoqingrui/docker/milvus/conf:/var/lib/milvus/conf \
    3. -v /Users/gaoqingrui/docker/milvus/logs:/var/lib/milvus/logs \
    4. -v /Users/gaoqingrui/docker/milvus/wal:/var/lib/milvus/wal \
    5. -v /Users/gaoqingrui/docker/milvus/db:/var/lib/milvus/db \
    6. milvusdb/milvus:cpu-latest

    server_config.yaml

    1. # Copyright (C) 2019-2020 Zilliz. All rights reserved.
    2. #
    3. # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
    4. # with the License. You may obtain a copy of the License at
    5. #
    6. # http://www.apache.org/licenses/LICENSE-2.0
    7. #
    8. # Unless required by applicable law or agreed to in writing, software distributed under the License
    9. # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
    10. # or implied. See the License for the specific language governing permissions and limitations under the License.
    11. version: 0.5
    12. #----------------------+------------------------------------------------------------+------------+-----------------+
    13. # Cluster Config | Description | Type | Default |
    14. #----------------------+------------------------------------------------------------+------------+-----------------+
    15. # enable | If running with Mishards, set true, otherwise false. | Boolean | false |
    16. #----------------------+------------------------------------------------------------+------------+-----------------+
    17. # role | Milvus deployment role: rw / ro | Role | rw |
    18. #----------------------+------------------------------------------------------------+------------+-----------------+
    19. # node_id | Node ID, used in log message only. | String | master |
    20. #----------------------+------------------------------------------------------------+------------+-----------------+
    21. cluster:
    22. enable: false
    23. role: rw
    24. node_id: master
    25. #----------------------+------------------------------------------------------------+------------+-----------------+
    26. # General Config | Description | Type | Default |
    27. #----------------------+------------------------------------------------------------+------------+-----------------+
    28. # timezone | Use UTC-x or UTC+x to specify a time zone. | Timezone | UTC+8 |
    29. #----------------------+------------------------------------------------------------+------------+-----------------+
    30. # meta_uri | URI for metadata storage, using SQLite (for single server | URI | sqlite://:@:/ |
    31. # | Milvus) or MySQL (for distributed cluster Milvus). | | |
    32. # | Format: dialect://username:password@host:port/database | | |
    33. # | Keep 'dialect://:@:/', 'dialect' can be either 'sqlite' or | | |
    34. # | 'mysql', replace other texts with real values. | | |
    35. #----------------------+------------------------------------------------------------+------------+-----------------+
    36. general:
    37. timezone: UTC+8
    38. meta_uri: mysql://root:6656778@mysql1:3306/milvus
    39. #----------------------+------------------------------------------------------------+------------+-----------------+
    40. # Network Config | Description | Type | Default |
    41. #----------------------+------------------------------------------------------------+------------+-----------------+
    42. # bind.address | IP address that Milvus server monitors. | IP | 0.0.0.0 |
    43. #----------------------+------------------------------------------------------------+------------+-----------------+
    44. # bind.port | Port that Milvus server monitors. Port range (1024, 65535) | Integer | 19530 |
    45. #----------------------+------------------------------------------------------------+------------+-----------------+
    46. # http.enable | Enable HTTP server or not. | Boolean | true |
    47. #----------------------+------------------------------------------------------------+------------+-----------------+
    48. # http.port | Port that Milvus HTTP server monitors. | Integer | 19121 |
    49. # | Port range (1024, 65535) | | |
    50. #----------------------+------------------------------------------------------------+------------+-----------------+
    51. network:
    52. bind.address: 0.0.0.0
    53. bind.port: 19530
    54. http.enable: true
    55. http.port: 19121
    56. #----------------------+------------------------------------------------------------+------------+-----------------+
    57. # Storage Config | Description | Type | Default |
    58. #----------------------+------------------------------------------------------------+------------+-----------------+
    59. # path | Path used to save meta data, vector data and index data. | Path | /var/lib/milvus |
    60. #----------------------+------------------------------------------------------------+------------+-----------------+
    61. # auto_flush_interval | The interval, in seconds, at which Milvus automatically | Integer | 1 (s) |
    62. # | flushes data to disk. | | |
    63. # | 0 means disable the regular flush. | | |
    64. #----------------------+------------------------------------------------------------+------------+-----------------+
    65. storage:
    66. path: /var/lib/milvus
    67. auto_flush_interval: 1
    68. #----------------------+------------------------------------------------------------+------------+-----------------+
    69. # WAL Config | Description | Type | Default |
    70. #----------------------+------------------------------------------------------------+------------+-----------------+
    71. # enable | Whether to enable write-ahead logging (WAL) in Milvus. | Boolean | true |
    72. # | If WAL is enabled, Milvus writes all data changes to log | | |
    73. # | files in advance before implementing data changes. WAL | | |
    74. # | ensures the atomicity and durability for Milvus operations.| | |
    75. #----------------------+------------------------------------------------------------+------------+-----------------+
    76. # path | Location of WAL log files. | String | |
    77. #----------------------+------------------------------------------------------------+------------+-----------------+
    78. wal:
    79. enable: true
    80. path: /var/lib/milvus/wal
    81. #----------------------+------------------------------------------------------------+------------+-----------------+
    82. # Cache Config | Description | Type | Default |
    83. #----------------------+------------------------------------------------------------+------------+-----------------+
    84. # cache_size | The size of CPU memory used for caching data for faster | String | 4GB |
    85. # | query. The sum of 'cache_size' and 'insert_buffer_size' | | |
    86. # | must be less than system memory size. | | |
    87. #----------------------+------------------------------------------------------------+------------+-----------------+
    88. # insert_buffer_size | Buffer size used for data insertion. | String | 1GB |
    89. # | The sum of 'insert_buffer_size' and 'cache_size' | | |
    90. # | must be less than system memory size. | | |
    91. #----------------------+------------------------------------------------------------+------------+-----------------+
    92. # preload_collection | A comma-separated list of collection names that need to | StringList | |
    93. # | be pre-loaded when Milvus server starts up. | | |
    94. # | '*' means preload all existing tables (single-quote or | | |
    95. # | double-quote required). | | |
    96. #----------------------+------------------------------------------------------------+------------+-----------------+
    97. # max_concurrent_insert_request_size | | | |
    98. # | A size limit on the concurrent insert requests to process. | String | 2GB |
    99. # | Milvus can process insert requests from multiple clients | | |
    100. # | concurrently. This setting puts a cap on the memory | | |
    101. # | consumption during this process. | | |
    102. #----------------------+------------------------------------------------------------+------------+-----------------+
    103. cache:
    104. cache_size: 2GB
    105. insert_buffer_size: 1GB
    106. preload_collection:
    107. max_concurrent_insert_request_size: 1GB
    108. #----------------------+------------------------------------------------------------+------------+-----------------+
    109. # GPU Config | Description | Type | Default |
    110. #----------------------+------------------------------------------------------------+------------+-----------------+
    111. # enable | Use GPU devices or not. | Boolean | false |
    112. #----------------------+------------------------------------------------------------+------------+-----------------+
    113. # cache_size | The size of GPU memory per card used for cache. | String | 1GB |
    114. #----------------------+------------------------------------------------------------+------------+-----------------+
    115. # gpu_search_threshold | A Milvus performance tuning parameter. This value will be | Integer | 1000 |
    116. # | compared with 'nq' to decide if the search computation will| | |
    117. # | be executed on GPUs only. | | |
    118. # | If nq >= gpu_search_threshold, the search computation will | | |
    119. # | be executed on GPUs only; | | |
    120. # | if nq < gpu_search_threshold, the search computation will | | |
    121. # | be executed on both CPUs and GPUs. | | |
    122. #----------------------+------------------------------------------------------------+------------+-----------------+
    123. # search_devices | The list of GPU devices used for search computation. | DeviceList | gpu0 |
    124. # | Must be in format gpux. | | |
    125. #----------------------+------------------------------------------------------------+------------+-----------------+
    126. # build_index_devices | The list of GPU devices used for index building. | DeviceList | gpu0 |
    127. # | Must be in format gpux. | | |
    128. #----------------------+------------------------------------------------------------+------------+-----------------+
    129. gpu:
    130. enable: false
    131. cache_size: 1GB
    132. gpu_search_threshold: 1000
    133. search_devices:
    134. - gpu0
    135. build_index_devices:
    136. - gpu0
    137. #----------------------+------------------------------------------------------------+------------+-----------------+
    138. # Logs Config | Description | Type | Default |
    139. #----------------------+------------------------------------------------------------+------------+-----------------+
    140. # trace.enable | Whether to enable trace level logging in Milvus. | Boolean | true |
    141. #----------------------+------------------------------------------------------------+------------+-----------------+
    142. # path | Absolute path to the folder holding the log files. | String | |
    143. #----------------------+------------------------------------------------------------+------------+-----------------+
    144. # max_log_file_size | The maximum size of each log file, size range | String | 1024MB |
    145. # | [512MB, 4096MB]. | | |
    146. #----------------------+------------------------------------------------------------+------------+-----------------+
    147. # log_rotate_num | The maximum number of log files that Milvus keeps for each | Integer | 0 |
    148. # | logging level, num range [0, 1024], 0 means unlimited. | | |
    149. #----------------------+------------------------------------------------------------+------------+-----------------+
    150. # log_to_stdout | Whether logging to standard output. | Boolean | false |
    151. #----------------------+------------------------------------------------------------+------------+-----------------+
    152. # log_to_file | Whether logging to log files. | Boolean | true |
    153. #----------------------+------------------------------------------------------------+------------+-----------------+
    154. logs:
    155. trace.enable: true
    156. path: /var/lib/milvus/logs
    157. max_log_file_size: 1024MB
    158. log_rotate_num: 0
    159. log_to_stdout: false
    160. log_to_file: true
    161. #----------------------+------------------------------------------------------------+------------+-----------------+
    162. # Log Config | Description | Type | Default |
    163. #----------------------+------------------------------------------------------------+------------+-----------------+
    164. # min_messages | Log level in Milvus. Must be one of debug, info, warning, | String | warning |
    165. # | error, fatal | | |
    166. #----------------------+------------------------------------------------------------+------------+-----------------+
    167. # rotation_age | When to generate new logfile. | Time | 24 hours |
    168. #----------------------+------------------------------------------------------------+------------+-----------------+
    169. # rotation_size | When to generate new logfile. | Size | 1GB |
    170. #----------------------+------------------------------------------------------------+------------+-----------------+
    171. log:
    172. min_messages: warning
    173. rotation_age: 24 hours
    174. rotation_size: 1GB