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

  • 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
主站蜘蛛池模板: 庆云县| 昌黎县| 揭西县| 鸡西市| 德阳市| 咸阳市| 巴林右旗| 常山县| 新宁县| 高密市| 红安县| 南充市| 奉节县| 蓝山县| 南宁市| 库尔勒市| 环江| 商南县| 蓝山县| 高要市| 宁阳县| 依兰县| 玛多县| 玉林市| 土默特右旗| 新巴尔虎左旗| 宜君县| 富阳市| 龙陵县| 四平市| 宽城| 博罗县| 莫力| 太仓市| 仪陇县| 石泉县| 图木舒克市| 马龙县| 鸡东县| 惠安县| 瑞丽市|