Deploying DeepSeek in a Docker Environment

Prerequisites

Restrictions

  • Currently, this operation is supported in a single-server Atlas 800I A3 SuperPoD Server system or single-server and two-node Atlas 800I A2 inference server (64 GB HCCS) systems.
  • Before deploying DeepSeek, configure the hccn_tool network for the target nodes. Refer to 1 to modify only the HCCN variable configuration area.

The following is a parameter configuration example. For a single-server system, enter information about the worker node. For a two-node system, enter information about two worker nodes and specify mindie_master. For details about the parameters, see Table 1 and Table 2.

[worker]
xx.xx.xx.77 ansible_ssh_user="******" ansible_ssh_pass="******"  
xx.xx.xx.87 ansible_ssh_user="******" ansible_ssh_pass="******." 

[all:vars]
mindie_master="xx.xx.xx.77"
weight_mount_path="/home/" # Weight mount directory, which is subsequently mounted to P/D instance containers. Ensure this directory contains the weight file.
model_weight_path="/home/whr/safetensor/" # Weight file path
cntr_mnt_path="/home/"
mindie_image_name="" 
mindie_image_file=""
Table 1 [worker] parameters

Parameter

Required or Not

Description

IP

Yes

Server IP address. You can enter multiple IP addresses. The details are described as follows:

  • index: sequence number of the server within the IP address segment, for example, 1.1.1.1-1.1.1.3 set_hostname="master-{index}", where 1.1.1.1 corresponds to set_hostname=master-1. The value is of the Int type. The default value is 1.
  • step_len: IP address step. The last IP address is retained even if it is not within the step. For example, if 1.1.1.1-1.1.1.6 step_len=2 is set, 1.1.1.1,1.1.1.3,1.1.1.5,1.1.1.6 is output.
  • Parameters can be parsed in the batch input configuration {}, including data calculation and conversion. After the parsing, the output is a character string. For example, if 1.1.1.1-1.1.1.3 set_hostname="master-{str(index+20)+'x'}" is entered, the parsed host information is 1.1.1.1 set_hostname="master-21x" ....
  • The IP address segment parameters support only Python 3.
  • When IPv6 is used, the IP address cannot be passed as a dynamic parameter.

ansible_ssh_user

Yes

Account for logging in to a remote server using SSH. The account must be root.

ansible_ssh_pass

No

Password for logging in to a remote server using SSH.

If SSH key-based authentication is configured and the root user is allowed for login, you do not need to set this parameter.

ansible_ssh_port

No

Port for SSH connection.

You do not need to set this parameter when the default port number 22 is used.

If a non-default port is used, you need to configure this parameter.

Table 2 [all:vars] parameters

Parameter

Required or Not

Description

weight_mount_path

Yes

Host directory mounted to a container. Example: /mnt/mindie_data/

model_weight_path

Yes

Path for accessing the weight file within a container. Example: /mnt/mindie_data/deepseek_diff_level/deepseek_r1_w8a8

mindie_image_name

No

Image name (name of the loaded MindIE image).

Example: mindie:dev-2.0.RC1.B091-800I-A2-py311-ubuntu22.04-aarch64

mindie_image_file

No

Path to the image file in shared storage (MindIE image not loaded yet).

Example: /mnt/weight/image/mindie_image*.tar.gz

cntr_mnt_path

Yes

Mount directory within a container, which is specified during container creation.

mindie_master

No

This parameter is required in a two-node system.

IP address of the MindIE master node in a two-node system.

  • If a MindIE image exists in the cluster, configure mindie_image_name. If a MindIE image file exists on each node, configure mindie_image_file. Set either of the two parameters. If both are provided, mindie_image_name takes priority. If neither is provided, MindCluster Ascend Deployer will search for the image file in the ascend_deployer/resources/MindIE-image directory.
  • Ensure that the MindIE image corresponding to mindie_image_name and the image file corresponding to mindie_image_file exist in the cluster environment.