Skip to content

Commit 0757ab7

Browse files
authored
Merge pull request #50 from huangshiyu13/dev
- add docker - update nlp package - update readme
2 parents 6905839 + 3990a5c commit 0757ab7

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ OpenRL-Lab将持续维护和更新OpenRL,欢迎大家加入我们的[开源社
6060
- [欢迎来到OpenRL](#欢迎来到openrl)
6161
- [目录](#目录)
6262
- [安装](#安装)
63+
- [使用Docker](#使用docker)
6364
- [快速上手](#快速上手)
6465
- [Gallery](#Gallery)
6566
- [使用OpenRL的项目](#使用OpenRL的项目)
@@ -96,6 +97,36 @@ pip install -e .
9697
openrl --version
9798
```
9899

100+
## 使用Docker
101+
102+
OpenRL目前也提供了包含显卡支持和非显卡支持的Docker镜像。
103+
如果用户的电脑上没有英伟达显卡,则可以通过以下命令获取不包含显卡插件的镜像:
104+
```bash
105+
sudo docker pull openrllab/openrl-cpu
106+
```
107+
108+
如果用户想要通过显卡加速训练,则可以通过以下命令获取:
109+
```bash
110+
sudo docker pull openrllab/openrl
111+
```
112+
113+
镜像拉取成功后,用户可以通过以下命令运行OpenRL的Docker镜像:
114+
```bash
115+
# 不带显卡加速
116+
sudo docker run -it openrllab/openrl-cpu
117+
# 带显卡加速
118+
sudo docker run -it --gpus all --net host openrllab/openrl
119+
```
120+
121+
进入Docker镜像后,用户可以通过以下命令查看OpenRL的版本然后运行测例:
122+
```bash
123+
# 查看Docker镜像中OpenRL的版本
124+
openrl --version
125+
# 运行测例
126+
openrl --mode train --env CartPole-v1
127+
```
128+
129+
99130
## 快速上手
100131

101132
OpenRL为强化学习入门用户提供了简单易用的接口,

README_en.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ For more information about OpenRL, please refer to the [documentation](https://o
7979
- [Welcome to OpenRL](#welcome-to-openrl)
8080
- [Outline](#outline)
8181
- [Installation](#installation)
82+
- [Use Docker](#use-docker)
8283
- [Quick Start](#quick-start)
8384
- [Gallery](#gallery)
8485
- [Projects Using OpenRL](#projects-using-openrl)
@@ -119,6 +120,35 @@ After installation, users can check the version of OpenRL through command line:
119120
openrl --version
120121
```
121122

123+
## Use Docker
124+
125+
OpenRL currently provides Docker images with and without GPU support.
126+
If the user's computer does not have an NVIDIA GPU, they can obtain an image without the GPU plugin using the following command:
127+
```bash
128+
sudo docker pull openrllab/openrl-cpu
129+
```
130+
131+
If the user wants to accelerate training with a GPU, they can obtain it using the following command:
132+
```bash
133+
sudo docker pull openrllab/openrl
134+
```
135+
136+
After successfully pulling the image, users can run OpenRL's Docker image using the following commands:
137+
```bash
138+
# Without GPU acceleration
139+
sudo docker run -it openrllab/openrl-cpu
140+
# With GPU acceleration
141+
sudo docker run -it --gpus all --net host openrllab/openrl
142+
```
143+
144+
Once inside the Docker container, users can check OpenRL's version and then run test cases using these commands:
145+
```bash
146+
# Check OpenRL version in Docker container
147+
openrl --version
148+
# Run test case
149+
openrl --mode train --env CartPole-v1
150+
```
151+
122152
## Quick Start
123153

124154
OpenRL provides a simple and easy-to-use interface for beginners in reinforcement learning.

0 commit comments

Comments
 (0)