Server Setup

Prerequisite

Use the following script to set up an on-premises server service.

  1. Install the docker.

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
#add docker to user group
sudo gpasswd -a $USER docker
#now restart your terminal for accessing docker without sudo
  1. Run the "docker ps" to confirm the installation of the docker.

ubuntu@ip-172-31-35-153:~$ docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
  1. Install the docker-compose. Make sure that the latest version of docker-compose is installed.

sudo apt-get remove docker-compose
sudo rm /usr/local/bin/docker-compose
pip uninstall docker-compose


VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | grep -Po '"tag_name": "\K.*\d')
DESTINATION=/usr/local/bin/docker-compose
sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION
sudo chmod 755 $DESTINATION
  1. Run the “docker-compose --version” to confirm the installation of the docker-compose.

Attention:

Perform steps 5 through 8 for GPU processing only.

  1. Install the nvidia drivers for GPU processing.

  1. Run the “nvidia-smi” to confirm the installation of the nvidia drivers.

  1. Install the nvidia-cuda-runtime.

  1. Run the “nvidia-container-toolkit --version” to confirm the installation of the nvidia-cuda-runtime.

Last updated

Was this helpful?