Last active
July 15, 2016 03:05
-
-
Save Shellbye/a77fa5ee8c2f9f7d1dd51c3c95ebb762 to your computer and use it in GitHub Desktop.
setup the env for fragment_extract in ubuntu 16 04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo apt-get update | |
sudo apt-get install -y python | |
sudo apt-get install -y git | |
sudo apt-get install -y nginx | |
# for Pillow | |
sudo apt-get install -y libjpeg-dev # ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting | |
sudo apt-get install -y zlib1g-dev # ValueError: zlib is required unless explicitly disabled using --disable-zlib, aborting | |
sudo apt-get install -y python-dev # error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 | |
# install & update pip | |
sudo apt-get install -y python-pip | |
export LC_ALL="en_US.UTF-8" # prevent error like 'locale.Error: unsupported locale setting' according to http://stackoverflow.com/questions/14547631/python-locale-error-unsupported-locale-setting/36257050#36257050 | |
pip install --upgrade pip | |
sudo pip install uwsgi | |
# cd /etc/nginx/ user "work", permission denied | |
mkdir machine_learning | |
cd machine_learning | |
git clone https://github.com/Shellbye/fragment_extract.git | |
sudo pip install -r /home/work/machine_learning/fragment_extract/requirements.txt | |
sudo ln -s /home/work/machine_learning/fragment_extract/nginx.conf /etc/nginx/sites-enabled/ | |
sudo service nginx stop | |
sudo service nginx start | |
sudo uwsgi --ini /home/work/machine_learning/fragment_extract/uwsgi.ini |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment