You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Docker-tutorial.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -39,30 +39,30 @@ Then you need to logout and login to the system again (disconnect and connect to
39
39
40
40
## Run container for the first time
41
41
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:
43
43
```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
45
45
```
46
46
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.
47
47
48
48
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.
49
49
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.
52
52
53
-
For Linux and OSX, the following command should work:
53
+
On Linux and OSX, an example command looks like:
54
54
```sh
55
55
docker run -it -p 8080:8080 --name coursera-aml-nlp -v $PWD:/root/coursera akashin/coursera-aml-nlp
56
56
```
57
57
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.
58
58
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
Where `/c/Users/$YOUR_USERNAME` is the path to your user's home folder.
64
64
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/.
0 commit comments