Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System dep updates #545

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft
24 changes: 13 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
version: 2.1

orbs:
browser-tools: circleci/browser-tools@1.4.0
ruby: circleci/ruby@1.8.0
browser-tools: circleci/browser-tools@1
ruby: circleci/ruby@2

default_environment: &default_environment
RAILS_ENV: test
Expand Down Expand Up @@ -59,20 +59,24 @@ jobs:
- run:
name: Install system deps
command: |
echo 'Acquire::Retries "5";' | sudo tee -a /etc/apt/apt.conf.d/80retries
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends build-essential default-jre-headless libpq-dev nodejs \
libreoffice-writer libreoffice-impress imagemagick unzip ghostscript \
libreoffice-writer libreoffice-impress imagemagick unzip ghostscript mediainfo \
libtesseract-dev libleptonica-dev liblept5 tesseract-ocr \
yarn libopenjp2-tools libxml2-dev libsqlite3-dev
yarn libopenjp2-tools libxml2-dev libsqlite3-dev libjemalloc2
sudo mkdir -p -m 777 /opt/fits
curl -fSL -o /tmp/fits-1.5.5.zip https://github.com/harvard-lts/fits/releases/download/1.5.5/fits-1.5.5.zip
sudo mv /tmp/fits-1.5.5.zip /opt/fits
cd /opt/fits && sudo unzip fits-1.5.5.zip && sudo chmod +X fits.sh
sudo sed -i 's/\(<tool.*TikaTool.*>\)/<!--\1-->/' /opt/fits/xml/fits.xml
echo 'export PATH=/opt/fits:$PATH' >> $BASH_ENV
curl -fSL -o /tmp/fits-1.6.0.zip https://github.com/harvard-lts/fits/releases/download/1.6.0/fits-1.6.0.zip
mv /tmp/fits-1.6.0.zip /opt/fits/fits.zip
cd /opt/fits && unzip fits.zip && chmod +X fits.sh
rm fits.zip /opt/fits/tools/mediainfo/linux/libmediainfo.so.0 /opt/fits/tools/mediainfo/linux/libzen.so.0
sed -i 's/\(<tool.*TikaTool.*>\)/<!--\1-->/' /opt/fits/xml/fits.xml
sudo ln -s /usr/lib/*-linux-gnu/libjemalloc.so.2 /usr/local/lib/libjemalloc.so.2
echo 'export PATH=/opt/fits:$PATH LD_PRELOAD=/usr/local/lib/libjemalloc.so.2' >> $BASH_ENV
sudo gem update --system --no-document

# Download and cache dependencies
- restore_cache:
Expand All @@ -84,8 +88,6 @@ jobs:
- run:
name: Install dependencies
command: |
gem update --system
gem update bundler
bundle config path $CIRCLE_WORKING_DIRECTORY/vendor/bundle
bundle install
bundle pristine webdrivers
Expand Down
20 changes: 11 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ RUN groupadd -g ${GROUP_ID} essi && \
useradd -m -l -g essi -u ${USER_ID} essi && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
curl -sL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get update -qq && \
apt-get install -y --no-install-recommends build-essential default-jre-headless libpq-dev nodejs \
libreoffice-writer libreoffice-impress imagemagick unzip ghostscript \
libreoffice-writer libreoffice-impress imagemagick unzip ghostscript mediainfo \
libtesseract-dev libleptonica-dev liblept5 tesseract-ocr \
yarn libopenjp2-tools libjemalloc2 && \
apt-get clean all && rm -rf /var/lib/apt/lists/* && \
Expand All @@ -20,12 +20,15 @@ RUN yarn && \
yarn config set no-progress && \
yarn config set silent
RUN mkdir -p /opt/fits && \
curl -fSL -o /opt/fits/fits-1.5.5.zip https://github.com/harvard-lts/fits/releases/download/1.5.5/fits-1.5.5.zip && \
cd /opt/fits && unzip fits-1.5.5.zip && rm fits-1.5.5.zip && chmod +X fits.sh && sed -i 's/\(<tool.*TikaTool.*>\)/<!--\1-->/' /opt/fits/xml/fits.xml
ENV PATH /opt/fits:$PATH
ENV RUBY_THREAD_MACHINE_STACK_SIZE 16777216
ENV RUBY_THREAD_VM_STACK_SIZE 16777216
ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so.2
curl -fSL -o /opt/fits/fits.zip https://github.com/harvard-lts/fits/releases/download/1.6.0/fits-1.6.0.zip && \
cd /opt/fits && unzip fits.zip && rm fits.zip tools/mediainfo/linux/libmediainfo.so.0 tools/mediainfo/linux/libzen.so.0 && \
chmod +X fits.sh && sed -i 's/\(<tool.*TikaTool.*>\)/<!--\1-->/' /opt/fits/xml/fits.xml
RUN gem update --system && chown -R essi:essi /usr/local/bundle
ENV PATH=/opt/fits:$PATH \
RUBY_THREAD_MACHINE_STACK_SIZE=16777216 \
RUBY_THREAD_VM_STACK_SIZE=16777216 \
LD_PRELOAD=/usr/local/lib/libjemalloc.so.2


###
# ruby dev image
Expand All @@ -40,7 +43,6 @@ COPY --chown=essi:essi Gemfile Gemfile.lock ./
# DEV ONLY - REMOVE LATER
# COPY --chown=essi:essi vendor/engines/bulkrax /app/vendor/engines/bulkrax
# COPY --chown=essi:essi vendor/engines/allinson_flex /app/vendor/engines/allinson_flex
RUN gem update bundler
RUN bundle install -j 2 --retry=3

COPY --chown=essi:essi . .
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ gem 'validatable'
gem 'country_select', '~> 4.0', require: 'country_select_without_sort_alphabetical'
gem 'prawn'
gem 'airbrake'
gem 'allinson_flex', github: 'IU-Libraries-Joint-Development/allinson_flex'
gem 'allinson_flex', github: 'IU-Libraries-Joint-Development/allinson_flex', branch: 'node18-fix'
gem 'okcomputer'

# Bulk Import / Export
Expand Down
13 changes: 6 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
GIT
remote: https://github.com/IU-Libraries-Joint-Development/allinson_flex.git
revision: 0fadf99b61b6567f240927e7dd54830878b315ac
revision: bc1787181f98480ec617d27e0b28634bcc5aadcf
branch: node18-fix
specs:
allinson_flex (0.1.0)
json_schemer
Expand Down Expand Up @@ -328,8 +329,6 @@ GEM
scanf (~> 1.0)
sxp (~> 1.2)
unicode-types (~> 1.7)
ecma-re-validator (0.4.0)
regexp_parser (~> 2.2)
equivalent-xml (0.6.0)
nokogiri (>= 1.4.3)
erubi (1.10.0)
Expand Down Expand Up @@ -561,11 +560,10 @@ GEM
rdf (~> 3.2)
json-schema (3.0.0)
addressable (>= 2.8)
json_schemer (0.2.21)
ecma-re-validator (~> 0.3)
json_schemer (1.0.1)
hana (~> 1.3)
regexp_parser (~> 2.0)
uri_template (~> 0.7)
simpleidn (~> 0.2)
jwt (2.4.1)
kaminari (1.2.2)
activesupport (>= 4.1.0)
Expand Down Expand Up @@ -954,6 +952,8 @@ GEM
simple_form (5.1.0)
actionpack (>= 5.2)
activemodel (>= 5.2)
simpleidn (0.2.1)
unf (~> 0.1.4)
sixarm_ruby_unaccent (1.2.0)
slop (4.9.2)
solr_wrapper (4.0.2)
Expand Down Expand Up @@ -1029,7 +1029,6 @@ GEM
unicode-display_width (2.1.0)
unicode-types (1.7.0)
unicode_utils (1.4.0)
uri_template (0.7.0)
validatable (1.6.7)
vcr (6.1.0)
warden (1.2.9)
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
"private": true,
"dependencies": {
"@babel/preset-react": "^7.9.4",
"@rails/webpacker": "^5.4.3",
"@rails/webpacker": "^5.4.4",
"@rjsf/core": "^2.0.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"immutability-helper": "^3.0.2",
"lodash": "^4.17.15",
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-bootstrap": "^1.0.1",
"react-dom": "^16.13.1",
"react": "^18.2.0",
"react-bootstrap": "^1.6.7",
"react-dom": "^18.2.0",
"react-jsonschema-form": "^1.8.1",
"react-jsonschema-form-bs4": "^1.7.1",
"react-spinners": "^0.8.1",
"react-spinners": "^0.13.8",
"react-transition-group": "^4.3.0",
"react_ujs": "^2.6.1",
"react_ujs": "^2.7.1",
"universalviewer": "3.1.4"
},
"scripts": {
Expand All @@ -34,6 +34,6 @@
"karma-jasmine": "^4.0.2",
"karma-selenium-launcher": "^1.0.1",
"karma-spec-reporter": "^0.0.34",
"webpack-dev-server": "^3.10.3"
"webpack-dev-server": "^4.15.0"
}
}
Loading