-
Notifications
You must be signed in to change notification settings - Fork 5
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
Recommended way for use in production? #6
Comments
So just to clarify things:
du -sh geocode/data
30M geocode/data
If you want to change default parameters, you need to recompute the pickle files. This means when you deploy with non-standard configuration you need to manage the pickle files yourself. One limitation of the current codebase is that there is no way to configure the data directory. What would be useful in your case would be to initialize like so: gc = geocode.Geocode(data_dir=<location of your pickle files>)
... |
Okay can you point me to where that initial pip install is doing the retrieval of the pickle files? If you're on board with it, I'd like to find some way to override the default where possible? |
The pickle files are packaged and part of the library when you pip install it. You can find the location of the pickle files e.g. with gc = geocode.Geocode()
gc.data_dir
# /home/martin/miniconda/lib/python3.9/site-packages/geocode/data
import os
os.listdir(gc.data_dir)
# ['geonames_6b64aaafc53116f.pkl', 'geonames_keyword_processor_6b64aaafc53116f.pkl'] |
Sorry maybe I misunderstood, is there a method to override the default parameters so that the install of the My thinking is you'd have 1-2 minutes for the |
Not sure if I understand, but for now, if you are using Docker, I would recommend to compute the new pickle files in the build process and then overwrite the existing ones in the |
Thanks @mar-muel, I'm personally using a VM so that |
@nicostombros Yes, that would be great |
@mar-muel Think I need access rights to make the push? |
You can open a pull request - check this https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request?tool=cli |
Thank you, created a PR now |
When deploying a project that includes
local-geocode
to production, I am wondering if there are any specific considerations to take into account? So far, I am struggling to be able to change the Geocode initialisation during production. Generally, I don't mind adding time to my build-time. I am wondering what sort of workflow is best here.Might it be:
Thank you
The text was updated successfully, but these errors were encountered: