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

  • 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
主站蜘蛛池模板: 夏邑县| 永寿县| 桃园市| 深泽县| 荥阳市| 竹北市| 苍溪县| 运城市| 新竹市| 杭州市| 文昌市| 洪洞县| 拜泉县| 汉川市| 尼木县| 奉贤区| 龙川县| 塔城市| 大英县| 册亨县| 军事| 泽州县| 大埔县| 大渡口区| 关岭| 旌德县| 双鸭山市| 安溪县| 内丘县| 丹凤县| 洞口县| 南陵县| 道真| 梁平县| 长治市| 靖边县| 舞钢市| 英山县| 乐清市| 松潘县| 敦化市|