As of a few weeks ago, the demo was demanding upwards around 10GB of local memory to run. Today, I was unable to run the demo without increasing my local memory allocation to 14GB and swap to 4GB. (see the log of the docker build/run script and resulting errors I was getting below).
$ docker build -t allennlp/demo:$GIT_HASH .
... Omitting build script log -Aaron
Successfully built a1ef1def8fb2
Successfully tagged allennlp/demo:26048b42e199e90bcd6e4e9608c9c16d416ef6ed
$
$ docker run -p 8000:8000 allennlp/demo:$GIT_HASH
/usr/local/lib/python3.6/site-packages/allennlp/service/predictors/__init__.py:23: FutureWarning: allennlp.service.predictors.* has been depreciated. Please use allennlp.predictors.*
"Please use allennlp.predictors.*", FutureWarning)
/usr/local/lib/python3.6/site-packages/allennlp/service/predictors/predictor.py:6: FutureWarning: allennlp.service.predictors.* has been deprecated. Please use allennlp.predictors.*
" Please use allennlp.predictors.*", FutureWarning)
demo db credentials not provided, so not using demo db
/usr/local/lib/python3.6/site-packages/torch/nn/modules/rnn.py:38: UserWarning: dropout option adds dropout after all but last recurrent layer, so non-zero dropout expects num_layers greater than 1, but got dropout=0.2 and num_layers=1
"num_layers={}".format(dropout, num_layers))
INFO:__main__:loading open-information-extraction model
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/local/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 445, in send
timeout=timeout
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 367, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.6/site-packages/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 384, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/local/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./app.py", line 300, in <module>
main()
File "./app.py", line 72, in main
predictor = demo_model.predictor()
File "/stage/allennlp/server/models.py", line 21, in predictor
archive = load_archive(self.archive_file)
File "/usr/local/lib/python3.6/site-packages/allennlp/models/archival.py", line 105, in load_archive
resolved_archive_file = cached_path(archive_file)
File "/usr/local/lib/python3.6/site-packages/allennlp/common/file_utils.py", line 86, in cached_path
return get_from_cache(url_or_filename, cache_dir)
File "/usr/local/lib/python3.6/site-packages/allennlp/common/file_utils.py", line 174, in get_from_cache
response = requests.head(url, allow_redirects=True)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 98, in head
return request('head', url, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 495, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
[INFO/MainProcess] process shutting down
$