-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,022 additions
and
12 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
FROM ubuntu:18.04 | ||
|
||
# Requirements for python installation, resource downloading tools, etc. | ||
RUN apt-get update && apt-get install -y git curl wget zlib1g-dev libssl-dev \ | ||
build-essential libsqlite3-dev \ | ||
libicu-dev locales libbz2-dev | ||
|
||
# Python 3.6 | ||
RUN curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash | ||
ENV PYENV_ROOT /root/.pyenv | ||
ENV PATH /root/.pyenv/shims:/root/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | ||
RUN pyenv install 3.6.0 | ||
RUN pyenv global 3.6.0 | ||
|
||
# Locales. | ||
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
dpkg-reconfigure --frontend=noninteractive locales | ||
|
||
# Update pip. | ||
RUN pip install --upgrade pip | ||
|
||
# Inistall ARElight project. | ||
COPY arelight /arelight | ||
RUN ls -la | ||
RUN pip install /arelight/. -r /arelight/dependencies.txt | ||
|
||
# Download required resources. | ||
# RUN python /arelight/download.py | ||
|
||
EXPOSE 80 | ||
|
||
# Setup apache configs. | ||
RUN apt-get clean && apt-get update && apt-get install -y apache2 python | ||
RUN a2enmod cgi | ||
RUN echo export PATH=/root/.pyenv/shims:/root/.pyenv/bin:$PATH >> /etc/apache2/envvars | ||
|
||
COPY apache_configs/* /etc/apache2/sites-enabled/ | ||
|
||
# Copy apache-based arelight demo. | ||
COPY demo /var/www/demo | ||
RUN chmod +x /var/www/demo/wui.py | ||
|
||
# Copy BRAT toolkit. | ||
COPY brat /var/www/demo/brat | ||
|
||
RUN chmod 777 -R /root/.pyenv && chmod 777 /root | ||
|
||
# Setup entrypoint | ||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
RUN chmod +x entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD ["apache2ctl", "-D", "FOREGROUND"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Alias /brat "/var/www/brat" | ||
<Directory "/var/www/brat"> | ||
AllowOverride All | ||
Order allow,deny | ||
Allow from all | ||
DirectoryIndex index.html | ||
Options -Indexes +ExecCGI -MultiViews +SymLinksIfOwnerMatch | ||
<Files *.cgi> | ||
SetHandler cgi-script | ||
</Files> | ||
</Directory> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Alias /examples/demo /var/www/demo | ||
<Directory /var/www/demo> | ||
Options Indexes FollowSymLinks ExecCGI | ||
AllowOverride None | ||
Require all granted | ||
<Files wui.py> | ||
SetHandler cgi-script | ||
Options +ExecCGI | ||
</Files> | ||
</Directory> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
script_dir=$(dirname $0) | ||
mkdir --parents $script_dir/arelight | ||
rsync -r $script_dir/../setup.py $script_dir/arelight | ||
rsync -r $script_dir/../dependencies.txt $script_dir/arelight/ | ||
rsync -r $script_dir/../download.py $script_dir/arelight | ||
rsync -r $script_dir/../arelight/ $script_dir/arelight/ | ||
rsync -r $script_dir/../examples/ $script_dir/examples/ | ||
|
||
# Download brat | ||
curl https://codeload.github.com/nlplab/brat/zip/refs/heads/v1.3p1 --output brat.zip | ||
unzip brat.zip && mv brat-1.3p1 brat | ||
rm brat.zip | ||
|
||
docker build -t nicolay-r/arelight $script_dir |
Oops, something went wrong.