Skip to content

Commit 416260d

Browse files
committed
add instruction regarding Docker usage in readmes
Signed-off-by: Yuxiang Gao <[email protected]>
1 parent 21919ff commit 416260d

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,24 @@ You also need to install **PyTorch** following the [official instructions](https
5757

5858
If you would like to try out the latest version, we suggest you to git clone from the repo and do `pip install -e .` instead of via PyPI.
5959

60+
### Docker Installation
61+
You can use the Dockerfile provided in the repository to build a docker image:
62+
```bash
63+
docker build -t genesis .
64+
```
65+
66+
And then run the examples inside the docker image:
67+
```bash
68+
xhost +local:root # Allow the container to access the display
69+
70+
docker run --gpus all --rm -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix genesis python examples/tutorials/hello_genesis.py
71+
72+
# Or with docker-compose
73+
docker compose up
74+
```
75+
76+
You need to install [Docker](https://www.docker.com/) and [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) to be able to run the container with GPU support.
77+
6078
### Documentation
6179

6280
Please refer to our [documentation site (English)](https://genesis-world.readthedocs.io/en/latest/user_guide/index.html) / [(Chinese)](https://genesis-world.readthedocs.io/zh-cn/latest/user_guide/index.html) for detailed installation steps, tutorials and API references.

README_CN.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,27 @@ pip install genesis-world # 需要 Python >=3.9;
5555

5656
您还需要按照 [官方说明](https://pytorch.org/get-started/locally/) 安装 **PyTorch**
5757

58+
### Docker 安装
59+
60+
您可以使用我们提供的 Dockerfile 构建 Docker 镜像:
61+
62+
```bash
63+
docker build -t genesis .
64+
```
65+
66+
然后在 Docker 镜像中运行示例:
67+
68+
```bash
69+
xhost +local:root # 允许容器访问显示
70+
71+
docker run --gpus all --rm -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix genesis python examples/tutorials/hello_genesis.py
72+
73+
# 或使用 docker-compose
74+
docker compose up
75+
```
76+
77+
您需要安装 [Docker](https://www.docker.com/)[NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) 以便在容器中使用 GPU。
78+
5879
### 文档
5980

6081
请参阅我们的 [文档网站(英文)](https://genesis-world.readthedocs.io/en/latest/user_guide/index.html)/[(中文)](https://genesis-world.readthedocs.io/zh-cn/latest/user_guide/index.html)以获取详细的安装步骤、教程和 API 参考。

0 commit comments

Comments
 (0)