[Environment configuration] Use Docker20.10.23 to configure FATE1.10.0 in Ubuntu (stand-alone deployment)

foreword

This article explains the method of using Docker20 to configure FATE1.10.0 in Ubuntu22. It
is divided into two parts: the official document and my own actual operation. You
need to install docker first. You can read my previous article.

1. FATE Standalone Deployment Guide (Official)

1. Description

Server configuration: (this is official, my system is Ubuntu), you can see that the configuration meets the requirements. The
insert image description here
stand-alone version provides 3 deployment methods, which can be selected according to the actual situation:

  • Install FATE using a Docker image
  • Install FATE in the host (using the compiled installation package)
  • Install FATE in the host (package and compile based on source code)

2. Install FATE using a Docker image (recommended)

It is recommended to use a docker image, which can greatly reduce the possibility of encountering problems
. Note, please replace ${version} with the actual version number in the following example, and refer to the FATE version in the fate.env file!

fate.env specifications:FATE=1.10.0 FATEFlow=1.10.0 FATEBoard=1.10.0 EGGROLL=2.4.8 CENTOS=7.2 UBUNTU=16.04 PYTHON=3.8 MAVEN=3.6.3 JDK=8 SPARK=3.3.1

2.1 Environment check before deployment

  • The host needs to be able to access the external network and pull the installation package and docker image from the public network.
  • Rely on docker, the recommended version of docker is 18.09, you can use the following command to verify the docker environment: docker --version, please refer to docker --help for start and stop of docker and other operations (my docker is the latest 20.10.23)
  • Before executing, please check whether 8080 is already occupied. If you want to execute it again, please use the docker command to delete the previous container and mirror
    to set the environment variables required for deployment (note that the environment variables set in the following way are only valid in the current terminal session, if you open a new terminal session, such as re-login or new window, please reset)
    export version={FATE version number deployed this time, such as 1.7.0}
    Example:
export version=1.7.0

2.2 Pull the image

ps: choose one of the methods

2.2.1 Through the public mirror service

# Docker Hub
docker pull federatedai/standalone_fate:${version}

# 腾讯云容器镜像
docker pull ccr.ccs.tencentyun.com/federatedai/standalone_fate:${version}
docker tag ccr.ccs.tencentyun.com/federatedai/standalone_fate:${version} federatedai/standalone_fate:${version}

2.2.2 Through the mirror package

wget https://webank-ai-1251170195.cos.ap-guangzhou.myqcloud.com/fate/${version}/release/standalone_fate_docker_image_${version}_release.tar.gz
docker load -i standalone_fate_docker_image_${version}_release.tar.gz
docker images | grep federatedai/standalone_fate

If you can see the image corresponding to ${version}, the image download is successful

2.3 start

docker run -it --name standalone_fate -p 8080:8080 federatedai/standalone_fate:${version}

2.4 Testing

source bin/init_env.sh

Jump to [4. Test items]

3. Install FATE in the host (using the compiled installation package)

slightly

4. Test items

4.1 Toy test

flow test toy -gid 10000 -hid 10000

If successful, the screen displays a statement similar to the following:

success to calculate secure_sum, it is 2000.0

4.2 Unit testing

fate_test unittest federatedml --yes

If successful, the screen displays a statement similar to the following:

there are 0 failed test

Some use case algorithms are in the examples folder, please try to use them.
You can also experience the algorithm process kanban through a browser, visit: Http://${ip}:8080, ip is 127.0.0.1 or the actual ip of the machine

5. Install FATE in the host (package and compile based on the source code)

slightly

2. My actual steps

1. View docker version

First docker --version to view the current docker version

2. Install using a public mirror service

Then use the installation method through the public image service in section 2.2.1.
The first method using the Tencent Cloud container image,
the version selection is 1.10.0
, you need to add sudo before the tutorial code

sudo docker pull ccr.ccs.tencentyun.com/federatedai/standalone_fate:1.10.0

Then enter your Ubuntu password and you're good to go
insert image description here

3. start

Execute the following code

sudo docker run -it --name standalone_fate -p 8080:8080 federatedai/standalone_fate:1.10.0

insert image description here

4. Load environment variables

Execute the following code

source bin/init_env.sh

insert image description here

5. Test items

5.1 Toy test

Execute the following code

flow test toy -gid 10000 -hid 10000

There are already results in the above figure

5.2 Unit testing

Execute the following code, this needs to run a lot of samples, it will take some time

fate_test unittest federatedml --yes

insert image description here
Finally can see
insert image description here

Guess you like

Origin blog.csdn.net/qq_44319167/article/details/128848282