cvondrick / vatic

Efficiently Scaling Up Video Annotation with Crowdsourced Marketplaces. IJCV 2012
http://mit.edu/vondrick/vatic/
MIT License
603 stars 255 forks source link

Instructions for OSX #11

Open varun-nagaraja opened 10 years ago

varun-nagaraja commented 10 years ago

Installation on OSX

The following procedure shows how to install Vatic on OSX with Anaconda Python and Homebrew. The rest of the instructions for using turkic remains the same as mentioned in README.

Author: Varun Nagaraja (varun@umiacs.umd.edu)

Dependencies

$ brew install openssl
$ brew link —force openssl
$ brew install mysql
$ mysql.server start
$ brew install httpd24
$ brew tap home-brew/apache
$ brew update

Before installing mod_wsgi execute the command to create symlink as mentioned on https://github.com/Homebrew/homebrew-apache

$ brew install mod_wsgi
$ pip install sqlalchemy parsedatetime

Download Vatic

$ wget http://mit.edu/vondrick/vatic/vatic-install.sh
$ chmod +x vatic-install.sh
$ ./vatic-install.sh
$ cd vatic

Setup Apache

Edit /etc/apache2/httpd.conf

On Yosemite, you will also have to uncomment LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so

Edit etc/apache2/extra/httpd-vhosts.conf instead of sites-enabled/000-default as done on Linux.

Remember to set the right path for anaconda python.

WSGIDaemonProcess www-data python-eggs=/tmp/.python-eggs
WSGIProcessGroup www-data

WSGIPythonHome /Users/<username>/anaconda

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot /Library/WebServer/vatic/public
    WSGIScriptAlias /server /Library/WebServer/vatic/server.py
    CustomLog /var/log/apache2/access.log combined
    <Directory "/Library/WebServer/vatic">
        Options Indexes FollowSymLinks MultiViews Includes
        AllowOverride None
        #For Yosemite
        Require all granted
        #For Mavericks, uncomment the below two lines and comment the above Require line
        #Order allow,deny
        #Allow from all
    </Directory>
</VirtualHost>

Restart the apache server

$ sudo apachectl graceful

Setup MySQL

$ mysql -u root
mysql> create database vatic;

Setup Vatic

Copy vatic folder to /Library/WebServer/vatic so that you do not have to provide write access to folders inside the home directory.

Videos

P.S: If things don’t work check /var/log/apache2/error.log. It tells you if there is any module that is not accessible or missing.

varun-nagaraja commented 10 years ago

I thought this might be helpful for others trying to install on OSX. It would be nice to add it in either README_OSX or in the existing README.

chris838 commented 9 years ago

Possible typo: brew tap home-brew/apache

Should be: brew tap homebrew/apache

chris838 commented 9 years ago

Another small typo: Edit etc/apache2/extra/httpd-vhosts.conf

Should be: Edit /etc/apache2/extra/httpd-vhosts.conf

varun-nagaraja commented 9 years ago

Thanks for the fixes Chris.

sm176357 commented 8 years ago

The .sh file contains apt-get install commands. Replacing it with brew leads to certain conflicts. Also packages like mysql and python packages parsedatetime are installed again by calling the .sh file. Brew could not dig up libavcodec and stuff. Is it possible to release a .sh installer which address all these and does every installation on the fly ?

corentin87 commented 7 years ago

I add some python import errors in my apache error.log and adding python-eggs=/path/.python-eggs fixed it! Thank

corentin87 commented 7 years ago

Also i had brew install mod_wsgi --with-homebrew-httpd24 --with-homebrew-python otherwise i was getting a conflict error from mod_wsgi because of not using the brew python!

YangBain commented 6 years ago

@corentin87 Hi, do you know why i always got No nodule named parsedatetime as the following show: beans@Beans:~/Annotation/vatic$ turkic setup --database Traceback (most recent call last): File "/usr/local/bin/turkic", line 5, in pkg_resources.run_script('turkic==0.2.5', 'turkic') File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1394, in run_script execfile(script_filename, namespace, namespace) File "/usr/local/lib/python2.7/dist-packages/turkic-0.2.5-py2.7.egg/EGG-INFO/scripts/turkic", line 12, in import cli File "/home/beans/Annotation/vatic/cli.py", line 22, in import parsedatetime ImportError: No module named parsedatetime %%%%%%%%%%%%%%%%%%%%%%%%%% But when I run python and import parsedatetime, it works. beans@Beans:~$ python Python 2.7.14 |Anaconda custom (64-bit)| (default, Oct 16 2017, 17:29:19) [GCC 7.2.0] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import parsedatetime

Any idea about this problem? Thank you very much.