Skip to content

Commit ec62bcc

Browse files
AnyaPaborg-dev
authored andcommitted
Make mounting in Docker tutorial more obvious
1 parent 311398f commit ec62bcc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Docker-tutorial.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,30 @@ Then you need to logout and login to the system again (disconnect and connect to
3939

4040
## Run container for the first time
4141

42-
Now you can start new container from this image with:
42+
Now you can start new container from this image with the following command:
4343
```sh
44-
docker run -it -p 8080:8080 --name coursera-aml-nlp akashin/coursera-aml-nlp
44+
docker run -it -p 8080:8080 --name coursera-aml-nlp akashin/coursera-aml-nlp -v path_on_your_machine:path_within_docker
4545
```
4646
This will start the Ubuntu instance and give you an access to its command line. You can type `run_notebook` to launch IPython notebook server.
4747

4848
Note that we are using `-p 8080:8080` argument to set up port forwarding to make IPython notebook accessible at address http://localhost:8080. If you're using AWS, make sure that you've [set up the port forwarding](https://github.com/hse-aml/natural-language-processing/blob/master/AWS-tutorial.md#2-set-up-dependencies-and-run-your-project) there as well.
4949

50-
Note, that the Docker image only contains system dependencies for the project (e.g. TensorFlow, Starspace).
51-
All other project-related files need to be exposed to the container manually though [Docker volumes](https://docs.docker.com/storage/volumes/). To do this, you will need to mount a directory from your local machine within the container using `-v` option.
50+
**Important:** Docker image only contains system dependencies for the project (e.g. TensorFlow, Starspace).
51+
All other project-related files (e.g. input data) need to be exposed to the container manually though [Docker volumes](https://docs.docker.com/storage/volumes/). To do this, we are mounting a directory from your machine within the container using `-v` option.
5252

53-
For Linux and OSX, the following command should work:
53+
On Linux and OSX, an example command looks like:
5454
```sh
5555
docker run -it -p 8080:8080 --name coursera-aml-nlp -v $PWD:/root/coursera akashin/coursera-aml-nlp
5656
```
5757
This will use shell alias `$PWD` to mount current directory to the folder `/root/coursera` in the container. Alternatively, you can mount arbitrary directory by replacing `$PWD` with a custom path.
5858

59-
For Windows, there are some extra [steps](https://rominirani.com/docker-on-windows-mounting-host-directories-d96f3f056a2c) involved, and the launch command looks like
59+
**On Windows**, there are some extra [steps](https://rominirani.com/docker-on-windows-mounting-host-directories-d96f3f056a2c) involved, and the launch command looks like
6060
```sh
6161
docker run -it -p 8080:8080 --name coursera-aml-nlp --user root -v /c/Users/$YOUR_USERNAME:/root/coursera akashin/coursera-aml-nlp
6262
```
6363
Where `/c/Users/$YOUR_USERNAME` is the path to your user's home folder.
6464

65-
If you're using Docker Toolbox on Windows, the command given above might not work because of the additional VirtualBox layer involved. Instead, we recommend you to follow the guidance in http://blog.shahinrostami.com/2017/11/docker-toolbox-windows-7-shared-volumes/.
65+
If you're using Docker Toolbox on Windows, the command given above might not work because of the additional VirtualBox layer involved. Instead, we recommend that you follow the guidance in http://blog.shahinrostami.com/2017/11/docker-toolbox-windows-7-shared-volumes/.
6666

6767
## Stop and resume container
6868

0 commit comments

Comments
 (0)