-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to deploy tldrstory to serverless environment? #5
Comments
Thank you for giving tldrstory a try, sorry to hear you're having issues. You'll need at least 8 GB of RAM to run the full stack. You shouldn't need a GPU though it would make some things faster. If you share the issues you're running into, I may be able to help. |
I am having trouble running the api backend in docker. My original plan was to use share.streamilit for the front-end tldrstory and google cloud run for the backend fastapi, was getting an issue that said config wasn't available. Could be related to my docker image.
Also moved the files to the root and updated the paths according to reference app.yml instead of sports/app.yml |
I think I know what's going on. I don't see it in this docker image but wherever you're starting fastapi, change the environment variable from INDEX_SETTINGS to CONFIG. The documentation on GitHub is out of date due to a recent txtai change. |
The documentation has now been updated. You'll want a separate yml file for the api with just the path to the index. The updated docs show this. |
Closing this issue due to inactivity. Please re-open or open a new issue if problems continue to persist. |
I'm having this error on step 3 (Start the API process in
https://github.com/neuml/tldrstory/blob/master/README.md), see below
screenshot. It looks like the txtai/api.py script is looking for
"INDEX_SETTINGS" environment variable, but the command line specified
"CONFIG" environment variable. I suspect I have an older version of
tldstory which expects "INDEX_SETTINGS" environment variable. So I did a
sudo pip3 install tldrstory -U, It says:
Successfully installed feedparser-6.0.2 sentence-transformers-0.4.1.2
sgmllib3k-1.0.0 tldrstory-1.3.0 tokenizers-0.10.1
transformers-4.3.3 txtai-2.0.0
When I start API process command again, it still generates the same error,
lookin for "INDEX_SETTING" variable. Any suggestions?
[image: image.png]
…On Wed, Dec 30, 2020 at 6:28 AM David Mezzetti ***@***.***> wrote:
Closing this issue due to inactivity. Please re-open or open a new issue
if problems continue to persist.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADAL76ZM4SW5SITZH2XK3OLSXM2I3ANCNFSM4U5LZ3KA>
.
|
INDEX_SETTINGS is from txtai and that was removed in txtai 1.5.0. I would go to your python site-packages directory and view the txtai/api.py file to see. A more brute force approach would be to run a grep on your file system to see where it's coming from find / -type f | grep py$ | xargs grep INDEX_SETTINGS The 2.0 version should look like this: https://github.com/neuml/txtai/blob/v2.0.0/src/python/txtai/api.py#L345 |
I noticed that I have a prior version of tldrstory and txtai packages in my
/home/cx/.local/lib/python3.8/site-packages/, but somehow the "pip install
tldrstory" command now installs the package in
/usr/local/lib/python3.8/dist-packages/. After removing my local home
version of the tldrstory and txtai packages, I was able to make the sports
demo work. By the way, there was another issue with api.yml file that was
downloaded from this command "wget
https://raw.githubusercontent.com/neuml/tldrstory/master/apps/sports/api.yml
-O sports/api.yml" in the readme.md file. This file specifies "path:
/data/sources/sports", which in my case, would be "./sports/data", if I
start the command in my "tldrstory" directory because "sports" was
installed in my home tldrstory directory. So 3 suggestions if I may:
1. in the readme file, maybe make a note of cleaning out prior
installations of the tldrstory package. It would be better if someone can
provide a script to clean the environment first before installing the
tldrstory package. (I'm also wondering why my prior installation of
tldrstory was in my own home directory, but the current "pip install
tldstory" installs tldrtory in system directory /usr/local/lib... )
2. clearly specify that the steps 2,3,4 in the readme.md file be performed
right above the "sports" directory
3. api.yml may be updated with "path: ./sports/data"
Again, thank you very much for creating the tldrstory package.
…On Thu, Mar 11, 2021 at 5:18 PM David Mezzetti ***@***.***> wrote:
INDEX_SETTINGS is from txtai and that was removed in txtai 1.5.0.
I would go to your python site-packages directory and view the
txtai/api.py file to see.
A more brute force approach would be to run a grep on your file system to
see where it's coming from
find / -type f | grep py$ | xargs grep INDEX_SETTINGS
The 2.0 version should look like this:
https://github.com/neuml/txtai/blob/v2.0.0/src/python/txtai/api.py#L345
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADAL762OGEQ6M2XCQWLIPMLTDFMUDANCNFSM4U5LZ3KA>
.
|
Glad you got it working! The first issue now makes sense looking at your prior message. Notice how the install was run with sudo, which would install system wide. The previous install must have been as a user. So I wouldn't consider any action on this as this is just a difference of how the package was installed. I suspect I have an older version of tldstory which expects "INDEX_SETTINGS" environment variable. So I did a sudo pip3 install tldrstory -U I'll create an issue to update the README for 2 + 3. Thank you for the feedback on this! |
I was not aware of the sudo difference. But if you could mention this in
the readme to highlight the potential version conflict that would be
greatly helpful for other people, just in case.
Chris
On Fri, Mar 12, 2021 at 05:29 David Mezzetti ***@***.***> wrote:
Glad you got it working!
The first issue now makes sense looking at your prior message. Notice how
the install was run with sudo, which would install system wide. The
previous install must have been as a user. So I wouldn't consider any
action on this as this is just a difference of how the package was
installed.
*I suspect I have an older version of tldstory which expects
"INDEX_SETTINGS" environment variable. So I did a sudo pip3 install
tldrstory -U*
I'll create an issue to update the README for 2 + 3. Thank you for the
feedback on this!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADAL76YEHTVRADEJDK2DPPTTDICJZANCNFSM4U5LZ3KA>
.
--
Sent from my Iphone
|
Hi, I was wondering if there was any recommended way to deploy to a free tier cloud environment such as heroku or google cloud platform.
I tried my best, but the combination of running the api backend and trying to dockerize tldrstory has me stumped.
I'm guessing the recommended way is to have a virtual machine with a GPU.
The text was updated successfully, but these errors were encountered: