Skip to content

Commit 33009d7

Browse files
authored
re-factor commands in Dockerfile to bash scripts (#54)
1 parent 1966eac commit 33009d7

39 files changed

+796
-855
lines changed

.travis.yml

Lines changed: 166 additions & 306 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 60 additions & 38 deletions
Large diffs are not rendered by default.

docker_atom/Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Distributed under the terms of the Modified BSD License.
2+
3+
# default value: Latest LTS version of Ubuntu (https://hub.docker.com/_/ubuntu)
4+
5+
FROM ubuntu:latest
6+
7+
LABEL maintainer="haobibo@gmail.com"
8+
9+
USER root
10+
11+
COPY work /opt/utils/
12+
13+
ENV SHELL=/bin/bash \
14+
DEBIAN_FRONTEND=noninteractive \
15+
LC_ALL="" \
16+
LC_CTYPE=C.UTF-8 \
17+
LC_TYPE=en_US.UTF-8 \
18+
LANG=en_US.UTF-8 \
19+
LANGUAGE=en_US.UTF-8 \
20+
HOME_DIR=/root
21+
22+
SHELL ["/bin/bash", "-c"]
23+
24+
# --> Install OS libraries and setup some configurations
25+
RUN cd /tmp \
26+
&& apt-get -y update --fix-missing > /dev/null && apt-get -y -qq upgrade \
27+
&& apt-get -qq install -y --no-install-recommends \
28+
apt-utils apt-transport-https ca-certificates gnupg2 dirmngr locales sudo lsb-release curl \
29+
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
30+
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen \
31+
&& echo "ALL ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
32+
&& mv /root/.bashrc /etc/bash_profile \
33+
&& echo '[ $BASH ] && [ -f /etc/bash_profile ] && . /etc/bash_profile' >> /etc/bash.bashrc \
34+
&& echo '[ $BASH ] && [ -f /root/.bashrc ] && . /root/.bashrc' >> /etc/bash.bashrc \
35+
# Clean up and display components version information...
36+
&& source /opt/utils/script-utils.sh && install__clean
37+
38+
WORKDIR $HOME_DIR

docker_atom/work/script-utils.sh

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
2+
# function to debug, resolve package names from a text file and display.
3+
install_echo() { cat $1 | cut -d "%" -f 1 | sed '/^$/d' | xargs -r -n1 printf '%s\n' ; }
4+
5+
# function to install apt-get packages from a text file which lists package names (add comments with % char)
6+
install_apt() { apt-get -y update --fix-missing > /dev/null && apt-get install -yq --no-install-recommends `cat $1 | cut -d '%' -f 1` ; }
7+
8+
# function to install conda packages from a text file which lists package names (add comments with % char)
9+
install_conda() { cat $1 | cut -d "%" -f 1 | sed '/^$/d' | xargs -r -n1 conda install -yq ; }
10+
11+
# function to install python packages with pip from a text file which lists package names (add comments with % char)
12+
install_pip() { cat $1 | cut -d "%" -f 1 | sed '/^$/d' | xargs -r -n1 pip install -U --pre --use-feature=2020-resolver ; }
13+
14+
# function to install R packages from a text file which lists package names (add comments with % char, use quiet=T to be less verbose)
15+
install_R() { R -e "options(Ncpus=4);lapply(scan('$1','c',comment.char='%'),function(x){cat(x,system.time(install.packages(x,clean=T,quiet=T)),'\n')})"; }
16+
17+
# function to install go packages with go from a text file which lists package names (add comments with % char)
18+
install_go() { cat $1 | cut -d "%" -f 1 | sed '/^$/d' | xargs -r -n1 go get -u ; }
19+
20+
# function to install julia packages from a text file which lists package names (add comments with % char)
21+
install_julia() { julia -e "import Pkg; l=filter(x->length(x)>0, [split(i,r\"%| |\t\")[1] for i in readlines(\"$1\")]); Pkg.add(l)" ; }
22+
23+
# function to install octave packages with go from a text file which lists package names (add comments with % char)
24+
install_octave() { cat $1 | cut -d "%" -f 1 | sed '/^$/d' | xargs -r -n1 -I {} sh -c 'octave --eval "pkg install -forge {}"' ; }
25+
26+
# function to download a ZIP file and unzip it to /opt/
27+
install_zip() { curl -o /tmp/TMP.zip -sL $1 && unzip -q -d /opt/ /tmp/TMP.zip && rm /tmp/TMP.zip ; }
28+
29+
# function to download a .tar.gz file and unzip it to /opt/, add a second argument to extract only those file
30+
install_tar_gz() { curl -o /tmp/TMP.tgz -sL $1 && tar -C /opt/ -xzf /tmp/TMP.tgz $2 && rm /tmp/TMP.tgz ; }
31+
32+
# function to download a .tar.xz file and unzip it to /opt/, add a second argument to extract only those file
33+
install_tar_xz() { curl -o /tmp/TMP.txz -sL $1 && tar -C /opt/ -xJf /tmp/TMP.txz $2 && rm /tmp/TMP.txz ; }
34+
35+
# function to install java packages from a text file which lists JAR file maven full names (add comments with % char)
36+
install_mvn() { cat $1 | cut -d "%" -f 1 | xargs -r -n1 -I {} mvn dependency:copy -DlocalRepositoryDirectory="/tmp/m2repo" -Djavax.net.ssl.trustStorePassword=changeit -Dartifact="{}" -DoutputDirectory="$2" ; }
37+
38+
# function to clean up
39+
install__clean(){
40+
which apt-get && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*
41+
which conda && conda clean -ya
42+
which npm && npm cache clean --force
43+
rm -rf /opt/conda/share/jupyter/lab/staging
44+
( rm -rf /root/.* /tmp/.* /tmp/* /var/log/* /var/cache/* || true )
45+
chmod ugo+rwXt /tmp
46+
find /opt/conda/lib | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
47+
echo "@ System environment variables:" && for e in $(echo $(printenv) | tr " " "\n") ; do echo $e ; done
48+
echo "@ Version of image: building finished at:" `date` `uname -a`
49+
true
50+
}
51+
52+
# function to list installed packages
53+
list_installed_packages() {
54+
type pip && echo "@ Version of Python and packages:" && python --version && pip list
55+
type conda && echo "@ Version of Conda and packages:" && conda info && conda list | grep -v "<pip>"
56+
type node && echo "@ Version of NodeJS and packages:" && node --version && npm --version && npm list -g --depth 0
57+
type java && echo "@ Version of Java (java/javac):" && java -version && javac -version
58+
type R && echo "@ Version of R and libraries:" && R --version && R -e "R.Version()\$version.string;installed.packages()[,c(3,10)]"
59+
type julia && echo "@ Version of Julia and packages" && julia --version && julia -e "using Pkg; for(k,v) in Pkg.dependencies(); println(v.name,\"==\",v.version); end"
60+
type go && echo "@ Version of golang and packages:" && go version && go list ...
61+
type octave && echo "@ Version of Octave and packages:" && octave --version && octave --eval "pkg list"
62+
true
63+
}

docker_base/Dockerfile

Lines changed: 23 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,31 @@
11
# Distributed under the terms of the Modified BSD License.
22

3-
# default value: Latest LTS version of Ubuntu (https://hub.docker.com/_/ubuntu)
4-
ARG base=ubuntu:latest
5-
FROM ${base:-base}
3+
ARG BASE_NAMESPACE
4+
ARG BASE_IMG="atom"
5+
FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG}
66

77
LABEL maintainer="haobibo@gmail.com"
88

9-
USER root
10-
11-
ENV SHELL=/bin/bash \
12-
DEBIAN_FRONTEND=noninteractive \
13-
LC_ALL=en_US.UTF-8 \
14-
LC_TYPE=en_US.UTF-8 \
15-
LC_CTYPE=C.UTF-8 \
16-
LANG=en_US.UTF-8 \
17-
LANGUAGE=en_US.UTF-8 \
18-
PATH=/opt/conda/bin:$PATH \
19-
HOME_DIR=/root
20-
21-
SHELL ["/bin/bash", "-c"]
22-
239
COPY work /opt/utils/
2410

25-
# --> Install OS libraries and setup some configurations
26-
RUN cd /tmp \
27-
&& apt-get -y update --fix-missing > /dev/null && apt-get -y -qq upgrade \
28-
&& apt-get -qq install -y --no-install-recommends \
29-
apt-utils apt-transport-https ca-certificates lsb-release gnupg2 dirmngr wget jq locales sudo \
30-
build-essential cmake unzip \
31-
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
32-
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen \
33-
&& echo "ALL ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \
34-
&& mv /root/.bashrc /etc/bash_profile \
35-
&& echo '[ $BASH ] && [ -f /etc/bash_profile ] && . /etc/bash_profile' >> /etc/bash.bashrc \
36-
&& echo '[ $BASH ] && [ -f /root/.bashrc ] && . /root/.bashrc' >> /etc/bash.bashrc \
37-
&& cat /opt/utils/script-utils.sh >> /etc/bash.bashrc \
38-
# Install libraries libs, utilities
39-
&& source /opt/utils/script-utils.sh \
40-
&& install_apt /opt/utils/install_list_base.apt \
41-
&& chmod 777 /tmp
11+
RUN source /opt/utils/script-utils.sh \
12+
&& install_apt /opt/utils/install_list_base.apt
4213

43-
# --> Install Python3 (Miniconda3), replace conda packages with pip source.
44-
RUN cd /tmp/ \
45-
&& wget -qO- "https://repo.continuum.io/miniconda/Miniconda3-py38_4.8.3-Linux-$(arch).sh" -O conda.sh && bash /tmp/conda.sh -f -b -p /opt/conda \
46-
&& conda config --system --prepend channels conda-forge \
47-
&& conda config --system --set auto_update_conda false \
48-
&& conda config --system --set show_channel_urls true \
49-
&& conda config --set channel_priority strict \
50-
&& conda update --all --quiet --yes \
51-
# These conda pkgs shouldn't be removed (otherwise will cause RemoveError) since they are directly reqiuired by conda: pip setuptools pycosat pyopenssl requests ruamel_yaml python-libarchive-c
52-
&& CONDA_PY_PKGS=`conda list | grep "py3" | cut -d " " -f 1 | sed "/#/d;/conda/d;/pip/d;/setuptools/d;/pycosat/d;/pyopenssl/d;/requests/d;/ruamel_yaml/d;/python-libarchive-c/d;"` \
53-
&& conda remove --force -yq $CONDA_PY_PKGS \
54-
&& pip install -UIq pip setuptools $CONDA_PY_PKGS \
55-
# Replace system Python3 with Conda's Python, and take care of `lsb_releaes`
56-
&& rm /usr/bin/python3 && ln -s /opt/conda/bin/python /usr/bin/python3 \
57-
&& mv /usr/share/pyshared/lsb_release.py /usr/bin/ \
58-
# Print Conda and Python packages information in the docker build log
59-
&& echo "@ Version of Conda & Python:" && conda info && conda list | grep -v "<pip>"
60-
61-
# --> Clean up and display components version information...
62-
RUN source /opt/utils/script-utils.sh \
63-
&& install__clean && cd \
64-
&& echo "@ Version of image: building finished at:" `date` `uname -a` \
65-
&& echo "@ System environment variables:" `printenv`
66-
67-
WORKDIR $HOME_DIR
14+
# Build and install tini, which will be entry point later...
15+
RUN cd /tmp \
16+
&& TINI_VERSION=$(curl -sL https://github.com/krallin/tini/releases.atom | grep 'releases/tag' | head -1 | grep -Po '\d[\d.]+' ) \
17+
&& curl -o tini.zip -sL "https://github.com/krallin/tini/archive/v${TINI_VERSION}.zip" && unzip -q /tmp/tini.zip \
18+
&& cmake /tmp/tini-* && make install && mv /tmp/tini /usr/bin/tini && chmod +x /usr/bin/tini
19+
20+
ENV PATH=/opt/conda/bin:$PATH
21+
22+
## --> Install Python3 (Miniconda3)
23+
RUN source /opt/utils/script-setup.sh && setup_conda && install__clean
24+
# Replace system Python3 with Conda's Python - note that /bin and /sbin are symlinks of /usr/bin in docker image ubuntu
25+
# && cp --verbose -rn /usr/lib/python3.8/* /opt/conda/lib/python3.8/ \
26+
# && mv /usr/share/pyshared/lsb_release.py /usr/bin/ \
27+
# && rm --verbose -rf $(/usr/bin/python3.8 -c 'import sys; print(" ".join(sys.path))') /usr/lib/python3* /usr/share/pyshared/ \
28+
# && ln -s /opt/conda/lib/python3.8 /usr/lib/ \
29+
# && TO_REPLACE="/usr/bin/python3;/usr/bin/python3.8" \
30+
# && for F in $(echo ${TO_REPLACE} | tr ";" "\n") ; do ( rm -f ${F} && ln -s /opt/conda/bin/python ${F} ) ; done \
31+
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
% This file contains apt packages to be installed with apt-get install line by line.
22
% Use percent char as line comment separator.
33

4-
openssh-client % To generate keys
5-
htop vim git % Process Management, Editor, Version Control
6-
curl rsync p7zip-full % Utilites
7-
iputils-ping % ping command
8-
python2.7 % required for some legacy packages like node-gyp
4+
htop vim git jq % Process Management, Editor, Version Control
5+
build-essential cmake % build essentials
6+
wget iputils-ping % download, network (ping)
7+
unzip p7zip-full % zip/unzip
8+
rsync % file transfer
9+
openssh-client % Provide ssh client and generate keys
10+
openssh-server % Provide ssh server (sshd)
11+
python2.7 % required by some legacy packages like node-gyp

docker_base/work/script-setup.sh

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
source /opt/utils/script-utils.sh
2+
3+
4+
setup_conda() {
5+
wget -qO- "https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-$(arch).sh" -O /tmp/conda.sh \
6+
&& bash /tmp/conda.sh -f -b -p /opt/conda \
7+
&& conda config --system --prepend channels conda-forge \
8+
&& conda config --system --set auto_update_conda false \
9+
&& conda config --system --set show_channel_urls true \
10+
&& conda config --set channel_priority strict \
11+
&& conda update --all --quiet --yes
12+
13+
# These conda pkgs shouldn't be removed (otherwise will cause RemoveError) since they are directly reqiuired by conda: pip setuptools pycosat pyopenssl requests ruamel_yaml
14+
CONDA_PY_PKGS=`conda list | grep "py3" | cut -d " " -f 1 | sed "/#/d;/conda/d;/pip/d;/setuptools/d;/pycosat/d;/pyopenssl/d;/requests/d;/ruamel_yaml/d;"` \
15+
&& conda remove --force -yq $CONDA_PY_PKGS \
16+
&& pip install -UIq pip setuptools $CONDA_PY_PKGS
17+
18+
# Print Conda and Python packages information in the docker build log
19+
echo "@ Version of Conda & Python:" && conda info && conda list | grep -v "<pip>"
20+
}
21+
22+
23+
setup_java_base() {
24+
# VERSION_OPENJDK=16 && VERSION_OPENJDK_EA=8 \
25+
# && URL_OPENJDK="https://download.java.net/java/early_access/jdk${VERSION_OPENJDK}/${VERSION_OPENJDK_EA}/GPL/openjdk-${VERSION_OPENJDK}-ea+${VERSION_OPENJDK_EA}_linux-x64_bin.tar.gz" \
26+
URL_OPENJDK="https://download.java.net/java/GA/jdk14.0.2/205943a0976c4ed48cb16f1043c5c647/12/GPL/openjdk-14.0.2_linux-x64_bin.tar.gz" \
27+
&& install_tar_gz ${URL_OPENJDK} && mv /opt/jdk-* /opt/jdk \
28+
&& ln -s /opt/jdk/bin/* /usr/bin/ \
29+
&& echo "@ Version of Java (java/javac):" && java -version && javac -version
30+
}
31+
32+
setup_java_maven() {
33+
MAVEN_VERSION="3.6.3" \
34+
&& install_zip "http://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.zip" \
35+
&& mv /opt/apache-maven-${MAVEN_VERSION} /opt/maven \
36+
&& ln -s /opt/maven/bin/mvn* /usr/bin/ \
37+
&& echo "@ Version of Maven:" && mvn --version
38+
}
39+
40+
41+
setup_node() {
42+
# NODEJS_VERSION_MAJOR="v14" && grep "v${NODEJS_VERSION_MAJOR}."
43+
ARCH="x64" \
44+
&& NODEJS_VERSION=$(curl -sL https://github.com/nodejs/node/releases.atom | grep 'releases/tag' | head -1 | grep -Po '\d[.\d]+') \
45+
&& NODEJS_VERSION_MAJOR=$(echo ${NODEJS_VERSION} | cut -d '.' -f1 ) \
46+
&& install_tar_gz "https://nodejs.org/download/release/latest-v${NODEJS_VERSION_MAJOR}.x/node-v${NODEJS_VERSION}-linux-${ARCH}.tar.gz" \
47+
&& mv /opt/node* /opt/node \
48+
&& echo "PATH=/opt/node/bin:$PATH" >> /etc/bash.bashrc \
49+
&& export PATH=/opt/node/bin:$PATH \
50+
&& npm install -g npm yarn \
51+
&& ln -s /opt/node/bin/* /usr/bin/ \
52+
&& echo "@ Version of Node, npm, and yarn:" `node -v` `npm -v` `yarn -v`
53+
}
54+
55+
56+
setup_R_base() {
57+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 \
58+
&& echo "deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/" > /etc/apt/sources.list.d/cran.list \
59+
&& install_apt /opt/utils/install_list_R_base.apt \
60+
&& echo "options(repos=structure(c(CRAN=\"https://cloud.r-project.org\")))" >> /etc/R/Rprofile.site \
61+
&& R -e "install.packages(c('devtools'),clean=T,quiet=T);" \
62+
&& ( type java && type R && R CMD javareconf || true ) \
63+
&& echo "@ Version of R:" && R --version
64+
}
65+
66+
67+
setup_R_rstudio() {
68+
RSTUDIO_VERSION=`curl -sL https://dailies.rstudio.com/rstudioserver/oss/ubuntu/x86_64/ | grep -Po "(?<=rstudio-server-)[0-9]\.[0-9]\.[0-9]+" | sort | tail -n 1` \
69+
&& wget -qO- "https://s3.amazonaws.com/rstudio-ide-build/server/bionic/amd64/rstudio-server-${RSTUDIO_VERSION}-amd64.deb" -O /tmp/rstudio.deb \
70+
&& dpkg -x /tmp/rstudio.deb /tmp && mv /tmp/usr/lib/rstudio-server/ /opt/ \
71+
&& ln -s /opt/rstudio-server /usr/lib/ \
72+
&& ln -s /opt/rstudio-server/bin/rs* /usr/bin/
73+
74+
# Allow RStudio server run as root user
75+
# Configuration to make RStudio server disable authentication and do not run as daemon
76+
mkdir -p /etc/rstudio \
77+
&& echo "server-daemonize=0" >> /etc/rstudio/rserver.conf \
78+
&& echo "server-user=root" >> /etc/rstudio/rserver.conf \
79+
&& echo "auth-none=1" >> /etc/rstudio/rserver.conf \
80+
&& echo "auth-minimum-user-id=0" >> /etc/rstudio/rserver.conf \
81+
&& echo "auth-validate-users=0" >> /etc/rstudio/rserver.conf \
82+
&& printf "#!/bin/bash\nexport USER=root\nrserver --www-port=8888" > /usr/local/bin/start-rstudio.sh \
83+
&& chmod u+x /usr/local/bin/start-rstudio.sh
84+
85+
# Remove RStudio's pandoc and pandoc-proc to reduce size if they are already installed in the jpy-latex step.
86+
( which pandoc && rm /opt/rstudio-server/bin/pandoc/pandoc || true ) \
87+
&& ( which pandoc-citeproc && rm /opt/rstudio-server/bin/pandoc/pandoc-citeproc || true ) \
88+
&& echo "@ Version of rstudio-server:" && rstudio-server version
89+
}
90+
91+
92+
setup_R_rshiny() {
93+
RSHINY_VERSION=$(curl -sL https://s3.amazonaws.com/rstudio-shiny-server-os-build/ubuntu-14.04/x86_64/VERSION) \
94+
&& wget -qO- "https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-${RSHINY_VERSION}-amd64.deb" -O /tmp/rshiny.deb \
95+
&& dpkg -i /tmp/rshiny.deb \
96+
&& sed -i "s/run_as shiny;/run_as root;/g" /etc/shiny-server/shiny-server.conf \
97+
&& sed -i "s/3838/8888/g" /etc/shiny-server/shiny-server.conf \
98+
&& printf "#!/bin/bash\nexport USER=root\nshiny-server" > /usr/local/bin/start-shiny-server.sh \
99+
&& chmod u+x /usr/local/bin/start-shiny-server.sh
100+
101+
# Remove shiny's pandoc and pandoc-proc to reduce size if they are already installed in the jpy-latex step.
102+
( which pandoc && rm /opt/shiny-server/ext/pandoc/pandoc || true ) \
103+
&& ( which pandoc-citeproc && rm /opt/shiny-server/ext/pandoc/pandoc-citeproc || true ) \
104+
&& rm /opt/shiny-server/ext/node/bin/shiny-server \
105+
&& ln -s /opt/shiny-server/ext/node/bin/node /opt/shiny-server/ext/node/bin/shiny-server
106+
107+
# hack shiny-server to allow run in root user: https://github.com/rstudio/shiny-server/pull/391
108+
sed -i "s/throw new Error/logger.warn/g" /opt/shiny-server/lib/worker/app-worker.js \
109+
&& echo "@ Version of shiny-server:" && shiny-server --version
110+
}
111+
112+
113+
setup_R_datascience() {
114+
# firstly install rgl stub to work around, which has too many deps, but required by some libs
115+
R -e "devtools::install_git(\"git://github.com/sorhawell/rgl.git\",quiet=T,clean=T)"
116+
117+
install_apt /opt/utils/install_list_R_datascience.apt \
118+
&& install_R /opt/utils/install_list_R_datascience.R
119+
}
120+
121+
122+
setup_GO() {
123+
GO_VERSION=$(curl -sL https://github.com/golang/go/releases.atom | grep 'releases/tag' | head -1 | grep -Po '\d[\d.]+') \
124+
&& GO_URL="https://dl.google.com/go/go$GO_VERSION.linux-$(dpkg --print-architecture).tar.gz" \
125+
&& install_tar_gz $GO_URL go \
126+
&& ln -s /opt/go/bin/go /usr/bin/ \
127+
&& echo "@ Version of golang and packages:" && go version
128+
}
129+
130+
131+
setup_julia() {
132+
JULIA_URL="https://julialangnightlies-s3.julialang.org/bin/linux/x64/julia-latest-linux64.tar.gz" \
133+
&& install_tar_gz $JULIA_URL \
134+
&& mv /opt/julia-* /opt/julia \
135+
&& ln -fs /opt/julia/bin/julia /usr/bin/julia \
136+
&& mkdir -p /opt/julia/pkg \
137+
&& echo "import Libdl; push!(Libdl.DL_LOAD_PATH, \"/opt/conda/lib\")" >> /opt/julia/etc/julia/startup.jl \
138+
&& echo "DEPOT_PATH[1]=\"/opt/julia/pkg\"" >> /opt/julia/etc/julia/startup.jl \
139+
&& echo "@ Version of Julia" && julia --version
140+
}
141+
142+
143+
setup_octave() {
144+
# TEMPFIX: javac version
145+
# && OCTAVE_VERSION="5.2.0" \
146+
# && install_tar_xz "https://ftp.gnu.org/gnu/octave/octave-${OCTAVE_VERSION}.tar.xz" \
147+
# && cd /opt/octave-* \
148+
# && sed -i "s/1.6/11/g" ./Makefile.in \
149+
# && sed -i "s/1.6/11/g" ./scripts/java/module.mk \
150+
# && ./configure --prefix=/opt/octave --disable-docs --without-opengl \
151+
# && make -j8 && make install -j8 \
152+
# && cd /opt/utils && rm -rf /opt/octave-*
153+
154+
install_apt /opt/utils/install_list_octave.apt \
155+
&& install_octave /opt/utils/install_list_octave.pkg \
156+
&& echo "@ Version of Octave and installed packages:" \
157+
&& /opt/octave/bin/octave --version
158+
}

0 commit comments

Comments
 (0)