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
{{ message }}
This repository was archived by the owner on Dec 16, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+19-17
Original file line number
Diff line number
Diff line change
@@ -39,13 +39,15 @@ environment you want to use, you can skip to the 'installing via pip' section.
39
39
40
40
Installing the library and dependencies is simple using `pip`.
41
41
42
-
```bash
43
-
pip install allennlp
44
-
```
42
+
```bash
43
+
pip install allennlp
44
+
```
45
45
46
46
That's it! You're now ready to build and train AllenNLP models.
47
47
AllenNLP installs a script when you install the python package, meaning you can run allennlp commands just by typing `allennlp` into a terminal.
48
48
49
+
You can now test your installation with `./scripts/verify.py`.
50
+
49
51
_`pip` currently installs Pytorch for CUDA 8 only (or no GPU). If you require a newer version,
50
52
please visit http://pytorch.org/ and install the relevant pytorch binary._
51
53
@@ -57,12 +59,13 @@ isolation and consistency, and also makes it easy to distribute your
57
59
environment to a compute cluster.
58
60
59
61
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.
61
63
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
+
```
63
67
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`.
66
69
67
70
### Installing from source
68
71
@@ -95,18 +98,19 @@ You can test your installation with `./scripts/verify.py`.
95
98
## Running AllenNLP
96
99
97
100
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).
100
102
101
103
```bash
102
104
$ allennlp
103
105
Run AllenNLP
104
106
105
107
optional arguments:
106
108
-h, --help show this help message and exit
109
+
--version show program's version number and exit
107
110
108
111
Commands:
109
-
112
+
113
+
configure Generate configuration stubs.
110
114
train Train a model
111
115
evaluate Evaluate the specified model + dataset
112
116
predict Use a trained model to make predictions.
@@ -136,7 +140,7 @@ following principles:
136
140
137
141
AllenNLP includes reference implementations of high quality models for Semantic
138
142
Role Labelling, Question and Answering (BiDAF), Entailment (decomposable
139
-
attention), and more.
143
+
attention), and more (see http://www.allennlp.org/models).
140
144
141
145
AllenNLP is built and maintained by the Allen Institute for Artificial
142
146
Intelligence, in close collaboration with researchers at the University of
@@ -181,21 +185,20 @@ state of the art models with high quality engineering.
181
185
182
186
## Docker images
183
187
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).
186
189
187
190
### Building a Docker image
188
191
189
192
For various reasons you may need to create your own AllenNLP Docker image.
190
193
The same image can be used either with a CPU or a GPU.
191
194
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).
193
196
Then run the following command
194
197
(it will take some time, as it completely builds the
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
207
210
208
211
### Running the Docker image
209
212
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.
212
214
213
215
You can test your installation by running `./scripts/verify.py`.
0 commit comments