From a2b7bbc1069fe55dd2a2322183e89567ac8724ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=B2=E6=BA=90?= <2402552459@qq.com> Date: Fri, 15 Sep 2023 14:44:31 +0800 Subject: [PATCH] polish(pu): polish dockerfile and its usage instructions --- Dockerfile | 4 ++-- README.md | 4 ++-- README.zh.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index eb9fad335..d36b5398c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/README.md b/README.md index 081f95086..593fdf05a 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/README.zh.md b/README.zh.md index c29aea6ee..0b394d59a 100644 --- a/README.zh.md +++ b/README.zh.md @@ -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