Install CPU-only Milvus

Prerequisites

Operating system requirements

Operating system Supported versions
CentOS 7.5 or higher
Ubuntu LTS 18.04 or higher
Windows Windows 10 64-bit: Pro, Enterprise, or Education (Build 15063 or later)
macOS 10.13 or higher

Hardware requirements

Component Recommended configuration
CPU Intel CPU Sandy Bridge or higher.
CPU instruction set
  • SSE42
  • AVX
  • AVX2
  • AVX512
  • RAM 8 GB or more (depends on the data volume)
    Hard drive SATA 3.0 SSD or higher

    Milvus Docker requirements

    • If you're using Ubuntu or CentOS, Install Docker 19.03 or higher on your local host machine.
    • If you're installing Milvus on Windows, install Docker Desktop, and make certain configurations in Settings -> Advanced. Make sure the Memory available to Docker Engine exceeds the sum of insert_buffer_size and cpu_cache_capacity you set in the server_config.yaml file.
    • If you're installing Milvus on macOS, install Docker Desktop for Mac, and make certain configurations in Settings -> Advanced. Make sure the Memory available to Docker Engine exceeds the sum of insert_buffer_size and cpu_cache_capacity you set in the server_config.yaml file.

    Install Milvus on Ubuntu/CentOS

    Step 1 Confirm Docker status

    Confirm that the Docker daemon is running in the background:

    $ docker info
    

    If you do not see the server listed, start the Docker daemon.

    Note: On Linux, Docker needs sudo privileges. To run Docker command without sudo, create the docker group and add your user. For details, see the post-installation steps for Linux.

    Step 2 Pull Docker image

    Pull the CPU-only image:

    $ docker pull milvusdb/milvus:0.9.0-cpu-d051520-cb92b1
    

    Note: If the pulling speed is too slow or the pulling process constantly fails, refer to Operational FAQ for possible solutions.

    Step 3 Download configuration files

    # Create Milvus file
    $ mkdir -p /home/$USER/milvus/conf
    $ cd /home/$USER/milvus/conf
    $ wget https://raw.githubusercontent.com/milvus-io/milvus/v0.9.0/core/conf/demo/server_config.yaml
    

    Note: In case you encounter problems downloading configuration files using wget command, you can also create server_config.yaml under /home/$USER/milvus/conf, then copy and paste the content from server config file.

    Step 4 Start Docker container

    # Start Milvus
    $ docker run -d --name milvus_cpu_0.9.0 \
    -p 19530:19530 \
    -p 19121:19121 \
    -p 9091:9091 \
    -v /home/$USER/milvus/db:/var/lib/milvus/db \
    -v /home/$USER/milvus/conf:/var/lib/milvus/conf \
    -v /home/$USER/milvus/logs:/var/lib/milvus/logs \
    -v /home/$USER/milvus/wal:/var/lib/milvus/wal \
    milvusdb/milvus:0.9.0-cpu-d051520-cb92b1
    

    The docker run options used in the above command are defined as follows:

    • -d: Run container in background and print container ID
    • --name: Assign a name to the container
    • --gpus: GPU devices to add to the container (‘all’ to pass all GPUs)
    • -p: Publish a container’s port(s) to the host
    • -v: Mounts the directory into the container

    Finally confirm Milvus running status by the following command:

    # Confirm Milvus status
    $ docker ps
    

    If Milvus server is not successfully started, you can check the error logs by the following command.

    # Get id of the container running Milvus
    $ docker ps -a
    # Check docker logs
    $ docker logs <milvus container id>
    

    Install Milvus on Windows

    The procedures of installing Milvus on Windows are similar to the steps on Ubuntu/CentOS, except for Step 3 and Step 4.

    For Step 3, instead of using wget to obtain the files, it is suggested to create a milvus file containing db, conf, logs, and wal folders in a location you find appropriate, for example on the C drive, and copy the the content from server config file to server_config.yaml that you created under C:\milvus\conf.

    For Step 4, start the docker by mapping Milvus files to the right path. The following command is run in Windows Command shell:

    # Start Milvus
    $ docker run -d --name milvus_cpu_0.9.0 \
    -p 19530:19530 \
    -p 19121:19121 \
    -p 9091:9091 \
    -v C:\milvus\db:/var/lib/milvus/db \
    -v C:\milvus\conf:/var/lib/milvus/conf \
    -v C:\milvus\logs:/var/lib/milvus/logs \
    -v C:\milvus\wal:/var/lib/milvus/wal \
    milvusdb/milvus:0.9.0-cpu-d051520-cb92b1
    

    Install Milvus on macOS

    The procedures of installing Milvus on Windows are similar to the steps on Ubuntu/CentOS, except for Step 3 and Step 4.

    For Step 3, the path has some minor differences:

    # Create Milvus file
    $ mkdir -p /Users/$USER/milvus/conf
    $ cd /Users/$USER/milvus/conf
    $ wget https://raw.githubusercontent.com/milvus-io/milvus/v0.9.0/core/conf/demo/server_config.yaml
    

    For Step 4, start the docker by mapping Milvus files to the right path:

    # Start Milvus
    $ docker run -d --name milvus_cpu_0.9.0 \
    -p 19530:19530 \
    -p 19121:19121 \
    -p 9091:9091 \
    -v /Users/$USER/milvus/db:/var/lib/milvus/db \
    -v /Users/$USER/milvus/conf:/var/lib/milvus/conf \
    -v /Users/$USER/milvus/logs:/var/lib/milvus/logs \
    -v /Users/$USER/milvus/wal:/var/lib/milvus/wal \
    milvusdb/milvus:0.9.0-cpu-d051520-cb92b1
    

    What's next

    Edit
    © 2019 - 2020 Milvus. All rights reserved.