Comments (3)
Here's the Dockerfile I used most recently for this, I believe it worked (this was back in June 2020).
FROM php:7.3-apache
LABEL maintainer="[email protected]"
System dependencies
RUN set -eux;
apt-get update;
apt-get install -y --no-install-recommends
git
librsvg2-bin
imagemagick
# Required for SyntaxHighlighting
python3
;
rm -rf /var/lib/apt/lists/*
Install the PHP extensions we need
RUN set -eux;
savedAptMark="$(apt-mark showmanual)";
apt-get update;
apt-get install -y --no-install-recommends
libicu-dev
;
docker-php-ext-install -j "$(nproc)"
intl
mbstring
mysqli
opcache
;
pecl install apcu-5.1.18;
docker-php-ext-enable
apcu
;
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.' > /dev/null;
apt-mark manual $savedAptMark;
ldd "$(php -r 'echo ini_get("extension_dir");')"/.so
| awk '/=>/ { print $3 }'
| sort -u
| xargs -r dpkg-query -S
| cut -d: -f1
| sort -u
| xargs -rt apt-mark manual;
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false;
rm -rf /var/lib/apt/lists/*
Enable Short URLs
RUN set -eux;
a2enmod rewrite;
{
echo '<Directory /var/www/html>';
echo ' RewriteEngine On';
echo ' RewriteCond %{REQUEST_FILENAME} !-f';
echo ' RewriteCond %{REQUEST_FILENAME} !-d';
echo ' RewriteRule ^ %{DOCUMENT_ROOT}/index.php [L]';
echo '';
} > "$APACHE_CONFDIR/conf-available/short-url.conf";
a2enconf short-url
set recommended PHP.ini settings
see https://secure.php.net/manual/en/opcache.installation.php
RUN {
echo 'opcache.memory_consumption=128';
echo 'opcache.interned_strings_buffer=8';
echo 'opcache.max_accelerated_files=4000';
echo 'opcache.revalidate_freq=60';
echo 'opcache.fast_shutdown=1';
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
SQLite Directory Setup
RUN set -eux;
mkdir -p /var/www/data;
chown -R www-data:www-data /var/www/data
MediaWiki setup - specify 1.35.0-wmf.38 version
RUN set -eux;
git clone https://gerrit.wikimedia.org/r/mediawiki/core.git --branch wmf/1.35.0-wmf.38 /var/www/html &&
cd /var/www/html &&
git submodule update --init
RUN apt-get update;
apt-get install -q -y curl nodejs npm
RUN npm install npm@latest -g
RUN cd /var/www/html/extensions &&
git clone https://github.com/google/abstracttext.git AbstractText
RUN cd /var/www/html/extensions/AbstractText/eneyj &&
npm install &&
npm install uuid &&
mkdir config &&
mkdir config/runs &&
node src/scripts/labelMap.js &&
cp src/scripts/calibration-initial.json config/calibration.json &&
node src/scripts/measure.js --chatty &&
node src/scripts/calibrate.js
COPY DockerLocalSettings.php /var/www/html/DockerLocalSettings.php
COPY AdditionalLocalSettings.php /tmp/AdditionalLocalSettings.php
COPY admin_passwd /tmp/admin_passwd
RUN cd /var/www/html &&
php maintenance/install.php --server http://localhost:8081 --dbtype sqlite --dbpath /var/www/data --scriptpath "" --passfile /tmp/admin_passwd "Lambda" "admin"
RUN cat /tmp/AdditionalLocalSettings.php >> /var/www/html/LocalSettings.php
RUN cd /var/www/html && php maintenance/update.php
RUN cd /var/www/html &&
php maintenance/importTextFiles.php -s "Import data" --prefix "M:" --overwrite extensions/AbstractText/eneyj/data/Z*
RUN chown -R www-data /var/www/data
from abstracttext.
@arthurpsmith Thanks. A few things got swallowed when you copy-pasted this. My interpretation (with a few "fixes") is here.
I couldn’t find the 1.35.0-wmf.38 branch you recommended, so I checked out tags/1.35.1 instead.
Now MediaWiki is missing some external dependencies. I guess I have some more reading to do.
from abstracttext.
However, as this is an abandoned proof-of-concept prototype, I guess it doesn’t make much sense to invest any more time. I wanted to play around with it, when I considered joining the abstract team. As this didn’t work out, I will try to keep an eye on what happens here. Best luck! I hope this project will grow and blossom!
from abstracttext.
Related Issues (15)
- How to handle transliteration in some languages? HOT 8
- Discussion - namespace of functions and other types HOT 3
- Cannot evaluate unlinearized (JSON) version of value(project_name) call HOT 4
- Representing types HOT 6
- new Dataset type (to apply functions over sets of tables) HOT 1
- editing? HOT 15
- Document requirements for minimum implementation/kernel HOT 4
- value(true) and value(false) produce errors HOT 2
- ReferenceError in measure.js HOT 3
- Question about using named arguments with named references HOT 3
- Document meaning of alpha/beta functions HOT 15
- Infinite recursion in normal representation of type (Z1K1)? HOT 5
- Tests - status? HOT 2
- Special pages? HOT 28
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abstracttext.