Open MedievalMatt opened 3 years ago
@MedievalMatt to create directories, you have to run bin/setup_directories.py now. Note: there's an issue with that script, and hopefully I'll have a PR soon for fixing it.
Well shoot. Do you have a sense of when the PR will happen? Or a list somewhere of what all would need to be created manually for things to move forward?
Sure, the directories you have to create are: image cache info cache log directory tmp directory www directory Note: you can use existing directories if you want, and just point loris to them in the loris2.conf file. then create the wsgi file (for serving via passenger or some python wsgi server) copy index.html and favicon into their places in the www directory
Here's what our wsgi file basically looks like:
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import sys
from os import path
project_dp = path.dirname(path.dirname(path.realpath(__file__)))
sys.path.append(project_dp)
conf_fp = path.join(project_dp, 'etc', 'loris2.conf')
from loris.webapp import create_app
application = create_app(debug=False, config_file_path=conf_fp)
You can modify it however you want.
the wsgi example shows that you need to have the loris2.conf file somewhere it can read - you can put that conf file where you want and then point the wsgi file to it. You can copy the existing one from the source repository and then modify it to fit your needs.
I submitted PR https://github.com/loris-imageserver/loris/pull/513 - feel free to try out that "packaging" branch and see if it helps.
I've never tried to pull down a PR rather than a branch so hopefully just pulling down packaging with the command git clone -b packaging https://github.com/loris-imageserver/loris.git
was the right move. No luck if it is. I also tried running ./setup_directories.py
just in case and got the following error:
File "./setup_directories.py", line 5, in <module> create_default_files_and_directories() File "/usr/local/lib/python2.7/dist-packages/Loris-3.0.0-py2.7.egg/loris/user_commands.py", line 91, in create_default_files_and_directories _make_directories(config) File "/usr/local/lib/python2.7/dist-packages/Loris-3.0.0-py2.7.egg/loris/user_commands.py", line 76, in _make_directories os.makedirs(d, exist_ok=True) TypeError: makedirs() got an unexpected keyword argument 'exist_ok'
Finally, I tried setting up a Digitalocean droplet just in case it was something with Dreamhost and ended up with the same issue. I still suspect it's a step I'm just not seeing, but I figured I'd let you guys know.
It seems you are running Python Version 2.7 (at least when running the setup_directories.py script). Loris 3 requires Python 3.5+. The last Loris version supporting Python 2.7 was 2.3.3. So consider switching to Python 3, which might be as easy as using python3
instead of python
when running the script.
Ok, will do. I went with 2.7 because I wasn't sure if the dependencies would carry over to 3 and I wanted to eliminate any oddities if I could.. I'll give you a heads up regarding how it works here in a bit.
ETA: That seemed to be part of it, but now I'm getting an error because (I think) Python is wanting libffi6 and Ubuntu 20.04 only has libffi7. I'm going to try dropping back a OS version tomorrow and see if that doesn't resolve things.
As a follow up to my comment last night, I just wanted to let you all know that everything works (with some manual changing of owners) under Ubuntu 18.04. I had to make some changes to the packages to reflect Python3 as opposed to Python2, obviously. Right now it serves images directly from URI, but I'm running into a CORS issue and it won't display the files if I add the manifest to an external test viewer; I think both of those are more a permissions issue than something about the code base, though, so they're something I'll muddle through on my own. Thanks BJ and Gunter for walking me through this (and especially you, BJ, for the quick patch).
PR #513 changes have been merged into the main development branch.
Just to let you guys know, I wrote up the bits from my install where I needed to update the instructions you have here at http://www.matthewedavis.net/node/129. I'm mentioning it in case you get someone else with an issue.
@MedievalMatt some doc changes have been merged into development - they might help with your install process.
Hello,
I'm attempting to install loris on a clean ubuntu 20.04 installation hosted on a Dreamhost cloud machine. The instructions did not throw any errors, but once finished the expected var/www/loris folder doesn't show up. I've installed Loris once before, but I'm kind of at a loss about what's going on without having any errors to work from.
Is there an extra step or some secret sauce that more experienced python/loris/IIIF folks might be able to suggest to me? I know how to code, but I really only build things to support my academic research so it's more crude welding and bashing my head than anything elegant.