diff --git a/README.md b/README.md index 16a98c0..9af360b 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,20 @@ [中文版本](README-zh.md) # Release Log +## Release-v0.1.3 +* Fix typos +* Add `sudo` before the `docker update --restart=always` command -## Release-v0.1.0 -* Finish basic functionalities of scripts. -* Finish README.md of English version. +## Release-v0.1.2 +* Fix a bug: `-v` can not work +* Add an option that can control whether or not to restart the new docker when physical machine restarts ## Release-v0.1.1 * Fix some typos -## Release-v0.1.2 -* Fix a bug: `-v` can not work -* Add an option that can control whether or not to restart the new docker when physical machine restarts +## Release-v0.1.0 +* Finish basic functionalities of scripts. +* Finish README.md of English version. # docker-script Some scripts for creating and configuring dockers. @@ -88,12 +91,21 @@ Options: -h, --help: print the manual page. Example: - $0 --name newdocker --publish 7777:22 --with-gpu 1 --gpus all -e \\ + $0 --name newdocker --publish 7777:22 --with-gpu 1 --gpus all -e \ NVIDIA_DRIVER_CAPABILITIES=compute,utility -e NVIDIA_VISIBLE_DEVICES=all ubuntu:latest $0 -n newdocker -p 7777:22 - $0 --name newdocker --publish 7777:22 --with-gpu 0 --distro ubuntu:latest --file \\ + $0 --name newdocker --publish 7777:22 --with-gpu 0 --distro ubuntu:latest --file \ + ./docker_initializer + + $0 -n newdocker -p 7777:22 -w 0 + +Note: + The second example will acts same as the first one does. + The fourth example will acts same as the third one does. + If you want to pass more than one argument for the same option, you should use more than one + (e.g., -p 22:22 -p 33:33). ``` # Something for Docker Users @@ -197,7 +209,7 @@ This part is for someone who wants to add some new scripts to the repository. As you can see, the repository now only have `install_ubuntu.sh` that works for `ubuntu`. But don't worry if you want to contribute to this repository and make the scripts work for other distros, that is very easy to do. Let me show you how. -Generally, the `create_docker.sh` need no updates. You just need update `docker_initializer/installer.sh` and `docker_initializer/installer_distro.sh` the first one is to chose which installer will be executed, its contents is like this: +Generally, the `create_docker.sh` need no updates. You just need update `docker_initializer/installer.sh` and `docker_initializer/installer_distro.sh` the first one is to chose which installer will be executed, its contents are like the following: ```bash #!/usr/bin/env bash @@ -215,7 +227,7 @@ else fi ``` -What you need to do for this one is simply add a new `elfi`, for example, if you want to add a new installer for `centos`, it may look like this: +What you need to do for this one is simply add a new `elif`, for example, if you want to add a new installer for `centos`, it may look like this: ```bash #!/usr/bin/env bash @@ -236,7 +248,7 @@ else fi ``` -Then you need to update the second file. For this example, you need create a file name `installer_centos.sh` in the same directory. And write what you want to do for the new distro. Here is what I have done in `installer_ubuntu.sh`: +Then you need to update the second file. For this example, you need create a file named `installer_centos.sh` in the same directory. And write what you want to do for the new distro. Here is what I have done in `installer_ubuntu.sh`: ```bash #!/usr/bin/env bash diff --git a/create_docker.sh b/create_docker.sh index 291baf0..2a3bb82 100644 --- a/create_docker.sh +++ b/create_docker.sh @@ -203,7 +203,7 @@ if ! confirm_cmd "$docker_enter_cmd"; then exit 1 fi -autorestart_cmd="docker update --restart=always $pure_name" +autorestart_cmd="$sudo_cmd docker update --restart=always $pure_name" if [ "$autorestart" -eq 1 ]; then if ! confirm_cmd "$autorestart_cmd"; then echo "terminated"