Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit 0b7bb20

Browse files
authored
Fixes and updates to README.md (#1718)
1 parent c47318b commit 0b7bb20

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

README.md

+19-17
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,15 @@ environment you want to use, you can skip to the 'installing via pip' section.
3939

4040
Installing the library and dependencies is simple using `pip`.
4141

42-
```bash
43-
pip install allennlp
44-
```
42+
```bash
43+
pip install allennlp
44+
```
4545

4646
That's it! You're now ready to build and train AllenNLP models.
4747
AllenNLP installs a script when you install the python package, meaning you can run allennlp commands just by typing `allennlp` into a terminal.
4848

49+
You can now test your installation with `./scripts/verify.py`.
50+
4951
_`pip` currently installs Pytorch for CUDA 8 only (or no GPU). If you require a newer version,
5052
please visit http://pytorch.org/ and install the relevant pytorch binary._
5153

@@ -57,12 +59,13 @@ isolation and consistency, and also makes it easy to distribute your
5759
environment to a compute cluster.
5860

5961
Once you have [installed Docker](https://docs.docker.com/engine/installation/)
60-
just run `docker run -it -p 8000:8000 --rm allennlp/allennlp:v0.6.1` to get an environment that will run on either the cpu or gpu.
62+
just run the following command to get an environment that will run on either the cpu or gpu.
6163

62-
You can now test your installation with `./scripts/verify.py`.
64+
```bash
65+
docker run -it -p 8000:8000 --rm allennlp/allennlp:v0.6.1`
66+
```
6367

64-
Our Docker image contains the AllenNLP source rather than a `pip` installation. Consequently, the `allennlp` commandline tool is not
65-
installed and you will have to use `./allennlp/run.py` instead.
68+
You can now test your installation with `./scripts/verify.py`.
6669

6770
### Installing from source
6871

@@ -95,18 +98,19 @@ You can test your installation with `./scripts/verify.py`.
9598
## Running AllenNLP
9699

97100
Once you've installed AllenNLP, you can run the command-line interface either
98-
with the `allennlp` command (if you installed via `pip`) or `python -m
99-
allennlp.run` (if you installed via source).
101+
with the `allennlp` command (if you installed via `pip`) or `bin/allennlp` (if you installed via source).
100102

101103
```bash
102104
$ allennlp
103105
Run AllenNLP
104106

105107
optional arguments:
106108
-h, --help show this help message and exit
109+
--version show program's version number and exit
107110
108111
Commands:
109-
112+
113+
configure Generate configuration stubs.
110114
train Train a model
111115
evaluate Evaluate the specified model + dataset
112116
predict Use a trained model to make predictions.
@@ -136,7 +140,7 @@ following principles:
136140
137141
AllenNLP includes reference implementations of high quality models for Semantic
138142
Role Labelling, Question and Answering (BiDAF), Entailment (decomposable
139-
attention), and more.
143+
attention), and more (see http://www.allennlp.org/models).
140144
141145
AllenNLP is built and maintained by the Allen Institute for Artificial
142146
Intelligence, in close collaboration with researchers at the University of
@@ -181,21 +185,20 @@ state of the art models with high quality engineering.
181185
182186
## Docker images
183187
184-
AllenNLP releases Docker images to Docker Cloud for each release. For information on how to run these releases, see
185-
[Installing using Docker](#installing-using-docker).
188+
AllenNLP releases Docker images to [Docker Hub](https://hub.docker.com/r/allennlp/) for each release. For information on how to run these releases, see [Installing using Docker](#installing-using-docker).
186189
187190
### Building a Docker image
188191
189192
For various reasons you may need to create your own AllenNLP Docker image.
190193
The same image can be used either with a CPU or a GPU.
191194
192-
First, follow the instructions above for setting up a development environment.
195+
First, you need to [install Docker](https://www.docker.com/get-started).
193196
Then run the following command
194197
(it will take some time, as it completely builds the
195198
environment needed to run AllenNLP.)
196199
197200
```bash
198-
docker build --tag allennlp/allennlp .
201+
docker build -f Dockerfile.pip --tag allennlp/allennlp:latest .
199202
```
200203
201204
You should now be able to see this image listed by running `docker images allennlp`.
@@ -207,8 +210,7 @@ allennlp/allennlp latest b66aee6cb593 5 minutes a
207210
208211
### Running the Docker image
209212
210-
You can run the image with `docker run --rm -it allennlp/allennlp`. The `--rm` flag cleans up the image on exit and the
211-
`-it` flags make the session interactive so you can use the bash shell the Docker image starts.
213+
You can run the image with `docker run --rm -it allennlp/allennlp:latest`. The `--rm` flag cleans up the image on exit and the `-it` flags make the session interactive so you can use the bash shell the Docker image starts.
212214
213215
You can test your installation by running `./scripts/verify.py`.
214216

0 commit comments

Comments
 (0)