├── 000-default.conf ├── Dockerfile ├── LICENSE ├── README.md ├── auto_conf.sh ├── httpd.conf └── supervisord.conf /000-default.conf: -------------------------------------------------------------------------------- 1 | 2 | ServerAdmin webmaster@localhost 3 | 4 | DocumentRoot /var/www/LabelMeAnnotationTool 5 | 6 | Options Indexes FollowSymLinks MultiViews Includes ExecCGI 7 | AddHandler cgi-script .cgi 8 | AllowOverride all 9 | Require all granted 10 | AddType text/html .shtml 11 | AddOutputFilter INCLUDES .shtml 12 | DirectoryIndex index.shtml tool.html 13 | 14 | 15 | ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ 16 | 17 | AllowOverride None 18 | Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch 19 | Order allow,deny 20 | Allow from all 21 | 22 | 23 | ErrorLog ${APACHE_LOG_DIR}/error.log 24 | CustomLog ${APACHE_LOG_DIR}/access.log combined 25 | 26 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04.4 2 | 3 | ##### UBUNTU 4 | # Update Ubuntu and add extra repositories 5 | RUN apt-get -y update 6 | RUN apt-get -y install software-properties-common 7 | RUN apt-get -y install apt-transport-https 8 | 9 | RUN apt-get -y update && apt-get -y upgrade 10 | 11 | # Install basic commands 12 | RUN apt-get -y install links nano htop git 13 | 14 | # Install basic commands 15 | RUN apt-get -y install make 16 | 17 | # Install Apache 18 | RUN apt-get -y install apache2 19 | RUN apt-get -y install libapache2-mod-perl2 20 | RUN apt-get -y install php5 libapache2-mod-php5 21 | 22 | # Install Supervisor 23 | RUN apt-get install -y supervisor 24 | RUN mkdir -p /var/log/supervisor 25 | 26 | # Get LabelMe 27 | RUN git clone https://github.com/CSAILVision/LabelMeAnnotationTool.git LabelMeAnnotationTool 28 | RUN cd LabelMeAnnotationTool; make 29 | RUN cp -a /LabelMeAnnotationTool /var/www/LabelMeAnnotationTool 30 | 31 | # Configure Apache 32 | RUN cp /notebooks/000-default.conf /etc/apache2/sites-available/000-default.conf 33 | RUN cp /notebooks/httpd.conf /etc/apache2/httpd.conf 34 | RUN a2enmod include 35 | RUN a2enmod rewrite 36 | RUN a2enmod cgi 37 | RUN mkdir -p /var/lock/apache2 /var/run/apache2 38 | 39 | # Access at http://127.0.0.1:PORT/LabelMeAnnotationTool/tool.html 40 | # service apache2 restart 41 | 42 | # Configure supervisor 43 | RUN cp /notebooks/supervisord.conf /etc/supervisor/conf.d/supervisord.conf 44 | 45 | EXPOSE 80 46 | RUN service apache2 restart 47 | RUN service apache2 stop 48 | 49 | CMD ["/usr/bin/supervisord"] 50 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 minoriwww 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 0 Intro 2 | 3 | >Here you will find the source code to install the LabelMe annotation tool on your server. LabelMe is an annotation tool writen in Javascript for online image labeling. The advantage with respect to traditional image annotation tools is that you can access the tool from anywhere and people can help you to annotate your images without having to install or copy a large dataset onto their computers. [LabelMe](https://github.com/CSAILVision/LabelMeAnnotationTool) 4 | 5 | 6 | # 1 Build 7 | ``` 8 | git clone https://github.com/minoriwww/LabelMe-docker.git 9 | docker build - < Dockerfile 10 | ``` 11 | 12 | # or Run by DockerCloud 13 | ``` 14 | docker rm -f labelme # if you have one image named labelme 15 | 16 | docker pull leodp/labelme 17 | 18 | docker run --name labelme -p 8081:80 -v DIR:/notebooks -it leodp/labelme /bin/bash -C /notebooks/auto_conf.sh 19 | # DIR is your path to this repo, end with repo's name 20 | ``` 21 | 22 | # 2 See URL 23 | http://127.0.0.1:8081 24 | 25 | # If error occured 26 | ``` 27 | sudo sh /notebooks/auto_conf.sh 28 | ``` 29 | -------------------------------------------------------------------------------- /auto_conf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sudo cp supervisord.conf /etc/supervisor/conf.d/supervisord.conf 3 | sudo cp 000-default.conf /etc/apache2/sites-available/000-default.conf 4 | sudo cp httpd.conf /etc/apache2/httpd.conf 5 | sudo a2enmod include 6 | sudo a2enmod rewrite 7 | sudo a2enmod cgi 8 | 9 | 10 | sudo service apache2 restart 11 | sudo service apache2 stop 12 | 13 | sudo /usr/bin/supervisord 14 | -------------------------------------------------------------------------------- /httpd.conf: -------------------------------------------------------------------------------- 1 | Options +Includes 2 | 3 | ScriptAlias "/cgi-bin" "/usr/local/apache2/cgi-bin/" 4 | 5 | 6 | Options +ExecCGI 7 | 8 | 9 | AddHandler cgi-script .cgi .pl 10 | -------------------------------------------------------------------------------- /supervisord.conf: -------------------------------------------------------------------------------- 1 | [program:apache2] 2 | command=/bin/bash -c "source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND" 3 | 4 | [supervisord] 5 | nodaemon=true 6 | --------------------------------------------------------------------------------