官术网_书友最值得收藏!

  • Python Reinforcement Learning
  • Sudharsan Ravichandiran Sean Saito Rajalingappaa Shanmugamani Yang Wenzhuo
  • 319字
  • 2021-06-24 15:17:27

Installing Docker

After installing Anaconda, we need to install Docker. Docker makes it easy to deploy applications to production. Say you built an application in your localhost that has TensorFlow and some other libraries and you want to deploy your applications into a server. You would need to install all those dependencies on the server. But with Docker, we can pack our application with its dependencies, which is called a container, and we can simply run our applications on the server without using any external dependency with our packed Docker container. OpenAI has no support for Windows, so to install OpenAI in Windows we need to use Docker. Also, the majority of OpenAI Universe's environment needs Docker to simulate the environment. Now let's see how to install Docker. 

To download Docker, go to https://docs.docker.com/ where you will see an option called Get Docker; if you select that, you will see options for different operating systems. If you are using either Windows or Mac, you can download Docker and install it directly using the graphical installer.

If you are using Linux, follow these steps:

Open your Terminal and type the following:

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

Then type:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

And then type:

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

Finally, type:

sudo apt-get update
sudo apt-get install docker-ce

We need to be a member of the Docker user group to start using Docker. You can join the Docker user group via the following command:

sudo adduser $(whoami) docker
newgrp docker
groups

We can test the Docker installation by running the built-in hello-world program:

sudo service docker start
sudo docker run hello-world

In order to avoid using sudo to use Docker every time, we can use the following command:

sudo groupadd docker
sudo usermod -aG docker $USER sudo reboot
主站蜘蛛池模板: 颍上县| 陆良县| 米易县| 阿坝县| 柳河县| 西安市| 岫岩| 晋江市| 重庆市| 江山市| 合肥市| 固阳县| 三台县| 安陆市| 和平县| 南阳市| 海林市| 阿城市| 阳高县| 海南省| 米易县| 历史| 招远市| 周宁县| 开封市| 安溪县| 应城市| 兴城市| 连城县| 黄石市| 南安市| 东光县| 新兴县| 溆浦县| 邵东县| 久治县| 新宾| 保康县| 南京市| 清流县| 东源县|