Use the following script to set up an on-premises server service.
Install the docker.
curl -fsSL https://get.docker.com -o get-docker.shsudo sh get-docker.sh#add docker to user groupsudo gpasswd -a $USER docker#now restart your terminal for accessing docker without sudo
Run the "docker ps" to confirm the installation of the docker.
Run the “docker-compose --version” to confirm the installation of the docker-compose.
ubuntu@ip-172-31-35-153:~$ docker-compose --versionDocker Compose version v2.17.2
Attention:
Perform steps 5 through 8 for GPU processing only.
Install the nvidia drivers for GPU processing.
sudo apt updatesudo apt upgrade -ysudo apt install nvidia-driver-515 nvidia-dkms-515-y[reboot required after this step]
Run the “nvidia-smi” to confirm the installation of the nvidia drivers.
ubuntu@ip-172-31-35-153:~$ nvidia-smiTue Apr 1810:11:412023+-----------------------------------------------------------------------------+|NVIDIA-SMI515.105.01 Driver Version:515.105.01CUDA Version:11.7||-------------------------------+----------------------+----------------------+|GPU Name Persistence-M| Bus-Id Disp.A| Volatile Uncorr. ECC|| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage |GPU-Util Compute M. ||||MIGM. ||===============================+======================+======================||0 Tesla T4 Off |00000000:00:1E.0 Off |0||N/A 46CP0 26W/ 70W| 2MiB / 15360MiB |0% Default ||||N/A|+-------------------------------+----------------------+----------------------++-----------------------------------------------------------------------------+| Processes:||GPUGICIPID Type Process name GPU Memory ||IDID Usage ||=============================================================================|| No running processes found |+-----------------------------------------------------------------------------+