I have a Google Cloud Run app run on GCP. After adding the following modification, the app crashed:
nltk.download('stopwords')
nltk.download('averaged_perceptron_tagger')
nltk.download('maxent_ne_chunker')
nltk.download('words')
I am suspicious that I need to manually install these files at the GCP server-side, but I don't know how to do so.
The log of the Cloud Run is as following, I don't know how to download resource for the Cloud Run, normally I use the App Engine, there's a cluster run behind. I have no idea how to debug this. Please help!
19-11-01 18:08:00.524 PDT Resource [93mpunkt[0m not found.
2019-11-01 18:08:00.524 PDT Please use the NLTK Downloader to obtain the resource:
2019-11-01 18:08:00.524 PDT
2019-11-01 18:08:00.524 PDT [31m>>> import nltk
2019-11-01 18:08:00.524 PDT >>> nltk.download('punkt')
2019-11-01 18:08:00.524 PDT [0m
2019-11-01 18:08:00.524 PDT For more information see: https://www.nltk.org/data.html
2019-11-01 18:08:00.524 PDT
2019-11-01 18:08:00.524 PDT Attempted to load [93mtokenizers/punkt/PY3/english.pickle[0m
2019-11-01 18:08:00.524 PDT
2019-11-01 18:08:00.524 PDT Searched in:
2019-11-01 18:08:00.524 PDT - '/home/nltk_data'
2019-11-01 18:08:00.524 PDT - '/usr/local/nltk_data'
2019-11-01 18:08:00.524 PDT - '/usr/local/share/nltk_data'
2019-11-01 18:08:00.524 PDT - '/usr/local/lib/nltk_data'
2019-11-01 18:08:00.524 PDT - '/usr/share/nltk_data'
2019-11-01 18:08:00.524 PDT - '/usr/local/share/nltk_data'
2019-11-01 18:08:00.524 PDT - '/usr/lib/nltk_data'
2019-11-01 18:08:00.524 PDT - '/usr/local/lib/nltk_data'
2019-11-01 18:08:00.524 PDT - ''
2019-11-01 18:08:00.524 PDT**********************************************************************
2019-11-01 18:08:00.524 PDT
2019-11-01 18:08:00.527 PDTPOST500498 B2.2 sChrome 78 https://model-zsairbvdca-uc.a.run.app/upload/documents
2019-11-01 18:08:01.329 PDTGET404437 B4 msChrome 78 https://model-zsairbvdca-uc.a.run.app/favicon.ico
Please help.