@@ -24,17 +24,17 @@ setup_conda_postprocess() {
24
24
&& conda update --all --quiet --yes
25
25
26
26
# 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
27
- 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;" ` \
28
- && conda remove --force -yq $ CONDA_PY_PKGS \
29
- && pip install -UIq pip setuptools $ CONDA_PY_PKGS
27
+ 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;" ) \
28
+ && conda remove --force -yq " ${ CONDA_PY_PKGS} " \
29
+ && pip install -UIq pip setuptools " ${ CONDA_PY_PKGS} "
30
30
31
31
# Print Conda and Python packages information in the docker build log
32
32
echo " @ Version of Conda & Python:" && conda info && conda list | grep -v " <pip>"
33
33
}
34
34
35
35
setup_conda_with_mamba () {
36
- VERSION_PTYHON =$1 ; shift 1;
37
- mamba install -y --root-prefix=" ${CONDA_PREFIX} " --prefix=" ${CONDA_PREFIX} " -c " conda-forge" conda pip python=" ${VERSION_PTYHON :- 3.10} "
36
+ VERSION_PYTHON =$1 ; shift 1;
37
+ mamba install -y --root-prefix=" ${CONDA_PREFIX} " --prefix=" ${CONDA_PREFIX} " -c " conda-forge" conda pip python=" ${VERSION_PYTHON :- 3.10} "
38
38
rm -rf /opt/conda/pkgs/*
39
39
setup_conda_postprocess
40
40
}
@@ -59,27 +59,27 @@ setup_nvtop() {
59
59
# Install Utilities `nvtop`
60
60
sudo apt-get -qq update --fix-missing && sudo apt-get -qq install -y --no-install-recommends libncurses5-dev
61
61
62
- DIRECTORY=` pwd`
62
+ DIRECTORY=$( pwd)
63
63
64
64
cd /tmp \
65
65
&& git clone https://github.com/Syllo/nvtop.git \
66
66
&& mkdir -pv nvtop/build && cd nvtop/build \
67
- && LIB_PATH=` find / -name " libnvidia-ml*" 2> /dev/null` \
68
- && cmake .. -DCMAKE_LIBRARY_PATH=" ` dirname $LIB_PATH ` " .. \
67
+ && LIB_PATH=$( find / -name " libnvidia-ml*" 2> /dev/null) \
68
+ && cmake .. -DCMAKE_LIBRARY_PATH=" $( dirname ${ LIB_PATH} ) " .. \
69
69
&& make && sudo make install \
70
70
&& nvtop --version
71
71
72
- cd $ DIRECTORY && rm -rf /tmp/nvtop
72
+ cd " ${ DIRECTORY} " && rm -rf /tmp/nvtop
73
73
74
74
sudo apt-get -qq remove -y libncurses5-dev
75
75
}
76
76
77
77
78
78
setup_java_base () {
79
79
VERSION_JDK=11 \
80
- && URL_OPENJDK=` curl -sL https://jdk.java.net/archive/ | grep ' linux-x64_bin.tar' | grep -v sha256 | sed -n ' s/.*href="\([^"]*\).*/\1/p' | grep " jdk${VERSION_JDK} " | head -n 1` \
80
+ && URL_OPENJDK=$( curl -sL https://jdk.java.net/archive/ | grep ' linux-x64_bin.tar' | grep -v sha256 | sed -n ' s/.*href="\([^"]*\).*/\1/p' | grep " jdk${VERSION_JDK} " | head -n 1) \
81
81
&& echo " Installing JDK from: ${URL_OPENJDK} " \
82
- && install_tar_gz ${URL_OPENJDK} && mv /opt/jdk-* /opt/jdk \
82
+ && install_tar_gz " ${URL_OPENJDK} " && mv /opt/jdk-* /opt/jdk \
83
83
&& ln -sf /opt/jdk/bin/* /usr/bin/ \
84
84
&& echo " @ Version of Java (java/javac):" && java -version && javac -version
85
85
}
@@ -104,8 +104,8 @@ setup_node() {
104
104
&& export PATH=/opt/node/bin:$PATH \
105
105
&& npm install -g npm yarn \
106
106
&& ln -sf /opt/node/bin/* /usr/bin/ \
107
- && echo " @ Version of Node, npm, and yarn:" ` node -v` ` npm -v` \
108
- && echo " @ Version of Yarn:" ` yarn -v`
107
+ && echo " @ Version of Node, npm, and yarn: $( node -v) $( npm -v) " \
108
+ && echo " @ Version of Yarn: $( yarn -v) "
109
109
}
110
110
111
111
@@ -116,7 +116,7 @@ setup_R_base() {
116
116
&& echo " options(repos=structure(c(CRAN=\" https://cloud.r-project.org\" )))" >> /etc/R/Rprofile.site \
117
117
&& R -e " install.packages(c('devtools'),clean=T,quiet=T);" \
118
118
&& ( type java && type R && R CMD javareconf || true ) \
119
- && echo " @ Version of R:" && R --version
119
+ && echo " @ Version of R: $( R --version) "
120
120
}
121
121
122
122
@@ -147,7 +147,7 @@ setup_R_rstudio() {
147
147
# Remove RStudio's pandoc and pandoc-proc to reduce size if they are already installed in the jpy-latex step.
148
148
( which pandoc && rm /opt/rstudio-server/bin/pandoc/pandoc || true ) \
149
149
&& ( which pandoc-citeproc && rm /opt/rstudio-server/bin/pandoc/pandoc-citeproc || true ) \
150
- && echo " @ Version of rstudio-server:" && rstudio-server version
150
+ && echo " @ Version of rstudio-server: $( rstudio-server version) "
151
151
}
152
152
153
153
@@ -168,7 +168,7 @@ setup_R_rshiny() {
168
168
169
169
# hack shiny-server to allow run in root user: https://github.com/rstudio/shiny-server/pull/391
170
170
sed -i " s/throw new Error/logger.warn/g" /opt/shiny-server/lib/worker/app-worker.js \
171
- && echo " @ Version of shiny-server:" && shiny-server --version
171
+ && echo " @ Version of shiny-server: $( shiny-server --version) "
172
172
}
173
173
174
174
@@ -184,9 +184,9 @@ setup_R_datascience() {
184
184
setup_GO () {
185
185
GO_VERSION=$( curl -sL https://github.com/golang/go/releases.atom | grep ' releases/tag' | head -1 | grep -Po ' \d[\d.]+' ) \
186
186
&& GO_URL=" https://dl.google.com/go/go$GO_VERSION .linux-$( dpkg --print-architecture) .tar.gz" \
187
- && install_tar_gz $ GO_URL go \
187
+ && install_tar_gz " ${ GO_URL} " go \
188
188
&& ln -sf /opt/go/bin/go /usr/bin/ \
189
- && echo " @ Version of golang:" && go version
189
+ && echo " @ Version of golang: $( go version) "
190
190
}
191
191
192
192
@@ -198,7 +198,7 @@ setup_julia() {
198
198
&& mkdir -p /opt/julia/pkg \
199
199
&& echo " import Libdl; push!(Libdl.DL_LOAD_PATH, \" /opt/conda/lib\" )" >> /opt/julia/etc/julia/startup.jl \
200
200
&& echo " DEPOT_PATH[1]=\" /opt/julia/pkg\" " >> /opt/julia/etc/julia/startup.jl \
201
- && echo " @ Version of Julia" && julia --version
201
+ && echo " @ Version of Julia: $( julia --version) "
202
202
}
203
203
204
204
@@ -215,15 +215,14 @@ setup_octave() {
215
215
216
216
install_apt /opt/utils/install_list_octave.apt \
217
217
&& install_octave /opt/utils/install_list_octave.pkg \
218
- && echo " @ Version of Octave and installed packages:" \
219
- && /opt/octave/bin/octave --version
218
+ && echo " @ Version of Octave and installed packages: $( /opt/octave/bin/octave --version) "
220
219
}
221
220
222
221
223
222
setup_traefik () {
224
223
TRAEFIK_VERSION=$( curl -sL https://github.com/traefik/traefik/releases.atom | grep ' releases/tag' | head -1 | grep -Po ' \d[\d.]+' ) \
225
224
&& TRAEFIK_URL=" https://github.com/traefik/traefik/releases/download/v${TRAEFIK_VERSION} /traefik_v${TRAEFIK_VERSION} _linux_$( dpkg --print-architecture) .tar.gz" \
226
- && install_tar_gz $ TRAEFIK_URL traefik \
225
+ && install_tar_gz " ${ TRAEFIK_URL} " traefik \
227
226
&& ln -sf /opt/traefik /usr/bin/ \
228
- && echo " @ Version of traefik:" && traefik version
227
+ && echo " @ Version of traefik: $( traefik version) "
229
228
}
0 commit comments