Skip to content

Commit

Permalink
polish(pu): polish dockerfile and its usage instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
puyuan1996 committed Sep 15, 2023
1 parent b03864a commit a2b7bbc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
# Before building the Docker image, create a new empty directory, move this Dockerfile into it,
# and navigate into this directory. This is to avoid sending unnecessary files to the Docker daemon
# during the build. Then you can then build the Docker image using the following command in your terminal:
# docker build -t ubuntu-py38-lz .
# docker build -t ubuntu-py38-lz:latest -f ./Dockerfile .

# To run a container from the image in interactive mode with a Bash shell, you can use:
# docker run -it --rm ubuntu-py38-lz /bin/bash
# docker run -dit --rm ubuntu-py38-lz:latest /bin/bash

# Once you're inside the container, you can run the example Python script with:
# python ./LightZero/zoo/classic_control/cartpole/config/cartpole_muzero_config.py
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ Here's how to use our Dockerfile to build a Docker image, run a container from t
```
3. **Build the Docker image**: Use the following command to build the Docker image. This command should be run from inside the directory that contains the Dockerfile.
```bash
docker build -t ubuntu-py38-lz .
docker build -t ubuntu-py38-lz:latest -f ./Dockerfile .
```
4. **Run a container from the image**: Use the following command to start a container from the image in interactive mode with a Bash shell.
```bash
docker run -it --rm ubuntu-py38-lz /bin/bash
docker run -dit --rm ubuntu-py38-lz:latest /bin/bash
```
5. **Execute LightZero code inside the container**: Once you're inside the container, you can run the example Python script with the following command:
```bash
Expand Down
4 changes: 2 additions & 2 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ pip3 install -e .
```
3. **构建 Docker 镜像**:使用以下命令构建 Docker 镜像。此命令应在包含 Dockerfile 的目录内运行。
```bash
docker build -t ubuntu-py38-lz .
docker build -t ubuntu-py38-lz:latest -f ./Dockerfile .
```
4. **从镜像运行容器**:使用以下命令以交互模式启动一个 Bash shell 的容器。
```bash
docker run -it --rm ubuntu-py38-lz /bin/bash
docker run -dit --rm ubuntu-py38-lz:latest /bin/bash
```
5. **在容器内执行 LightZero 代码**:一旦你在容器内部,你可以使用以下命令运行示例 Python 脚本:
```bash
Expand Down

0 comments on commit a2b7bbc

Please sign in to comment.