1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 export DEBIAN_FRONTEND=noninteractive
6 export GEM_HOME=/var/lib/arvados/lib/ruby/gems/2.5.0
7 export PATH=${PATH}:/usr/local/go/bin:$GEM_HOME/bin:/var/lib/arvados/bin
8 export npm_config_cache=/var/lib/npm
9 export npm_config_cache_min=Infinity
10 export R_LIBS=/var/lib/Rlibs
11 export HOME=$(getent passwd arvbox | cut -d: -f6)
12 export ARVADOS_CONTAINER_PATH=/var/lib/arvados-arvbox
14 defaultdev=$(/sbin/ip route|awk '/default/ { print $5 }')
15 dockerip=$(/sbin/ip route | grep default | awk '{ print $3 }')
16 containerip=$(ip addr show $defaultdev | grep 'inet ' | sed 's/ *inet \(.*\)\/.*/\1/')
17 if test -s /var/run/localip_override ; then
18 localip=$(cat /var/run/localip_override)
23 root_cert=$ARVADOS_CONTAINER_PATH/root-cert.pem
24 root_cert_key=$ARVADOS_CONTAINER_PATH/root-cert.key
25 server_cert=$ARVADOS_CONTAINER_PATH/server-cert-${localip}.pem
26 server_cert_key=$ARVADOS_CONTAINER_PATH/server-cert-${localip}.key
37 [arv-git-httpd-ssl]=9000
53 if test "$(id arvbox -u 2>/dev/null)" = 0 ; then
62 if test -f Gemfile.lock ; then
63 # The 'gem install bundler line below' is cf.
64 # https://bundler.io/blog/2019/05/14/solutions-for-cant-find-gem-bundler-with-executable-bundle.html,
65 # until we get bundler 2.7.10/3.0.0 or higher
66 flock $GEM_HOME/gems.lock gem install bundler --no-document -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1|tr -d ' ')"
71 # if ! test -x $GEM_HOME/bin/bundler ; then
73 # bundlergem=$(ls -r $GEM_HOME/cache/bundler-${bundleversion}.gem 2>/dev/null | head -n1 || true)
74 # if test -n "$bundlergem" ; then
75 # flock $GEM_HOME/gems.lock gem install --verbose --local --no-document $bundlergem
77 # flock $GEM_HOME/gems.lock gem install --verbose --no-document bundler --version ${bundleversion}
80 # Make sure to put the gem binaries in the right place
81 flock /var/lib/arvados/lib/ruby/gems/2.5.0/gems.lock bundler config bin $GEM_HOME/bin
82 if ! flock $GEM_HOME/gems.lock bundler install --verbose --local --no-deployment $frozen "$@" ; then
83 flock $GEM_HOME/gems.lock bundler install --verbose --no-deployment $frozen "$@"
90 for p in $(ls http*.tar.gz) $(ls http*.tar.bz2) $(ls http*.whl) $(ls http*.zip) ; do
92 ln -sf $p $(echo $p | sed 's/.*%2F\(.*\)/\1/')
97 if [ "$PYCMD" = "python3" ]; then
98 if ! pip3 install --prefix /usr/local --no-index --find-links /var/lib/pip $1 ; then
99 pip3 install --prefix /usr/local $1
102 if ! pip install --no-index --find-links /var/lib/pip $1 ; then