Skip to content

Commit 25e3a4f

Browse files
committed
Update install script
Remove mamba from the install script
1 parent 0593f57 commit 25e3a4f

File tree

1 file changed

+7
-57
lines changed

1 file changed

+7
-57
lines changed

install.sh

Lines changed: 7 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -143,39 +143,6 @@ _verlt() {
143143
[ "$1" = "$2" ] && return 1 || verlte "$1" "$2"
144144
}
145145

146-
############
147-
# CONDA
148-
############
149-
150-
get_conda_version() {
151-
local version
152-
version="$($(get_conda_binary) --version | grep conda | cut -d' ' -f2)"
153-
154-
echo "${version}"
155-
}
156-
157-
has_mamba(){
158-
: '
159-
Check if mamba exists
160-
'
161-
if ! type mamba 1>/dev/null 2>&1; then
162-
return 1
163-
fi
164-
return 0
165-
166-
}
167-
168-
get_conda_binary(){
169-
: '
170-
Use mamba if possible
171-
'
172-
if has_mamba; then
173-
echo "mamba"
174-
else
175-
echo "conda"
176-
fi
177-
178-
}
179146

180147
has_conda_env() {
181148
: '
@@ -280,16 +247,6 @@ update_conda_env() {
280247
fi
281248
}
282249

283-
check_conda_version() {
284-
: '
285-
Make sure at the latest conda version
286-
'
287-
if ! _verlte "${REQUIRED_CONDA_VERSION}" "$(get_conda_version)"; then
288-
echo_stderr "Your conda version is too old"
289-
return 1
290-
fi
291-
}
292-
293250
run_conda_create() {
294251
: '
295252
Run the conda create command
@@ -298,7 +255,7 @@ run_conda_create() {
298255
local name="$1"
299256
local env_file="$2"
300257

301-
"$(get_conda_binary)" env create \
258+
conda env create \
302259
--quiet \
303260
--name="${name}" \
304261
--file="${env_file}"
@@ -312,7 +269,7 @@ run_conda_update() {
312269
local name="$1"
313270
local env_file="$2"
314271

315-
"$(get_conda_binary)" env update \
272+
conda env update \
316273
--quiet \
317274
--name="${name}" \
318275
--file="${env_file}"
@@ -386,13 +343,11 @@ set -u
386343
# Installations
387344
echo_stderr "Checking conda, jq and node/nodejs/docker are installed"
388345

389-
if ! has_mamba; then
390-
echo_stderr "'mamba' not found, if you find that the installation of the conda env is slow, please try again by installing mamba through 'conda install -c conda-forge mamba'"
391-
if ! has_conda; then
392-
echo_stderr "Error, could not find conda binary."
393-
echo_stderr "Please install conda and ensure it is in your \"\$PATH\" environment variable before continuing"
394-
exit 1
395-
fi
346+
347+
if ! has_conda; then
348+
echo_stderr "Error, could not find conda binary."
349+
echo_stderr "Please install conda and ensure it is in your \"\$PATH\" environment variable before continuing"
350+
exit 1
396351
fi
397352

398353
if ! has_jq; then
@@ -406,11 +361,6 @@ if ! has_node; then
406361
exit 1
407362
fi
408363

409-
if ! check_conda_version; then
410-
echo_stderr "Your conda version is out of date, please run \"conda update -n base -c defaults conda\" before continuing"
411-
exit 1
412-
fi
413-
414364
if ! check_readlink_program; then
415365
echo_stderr "Failed at readlink check stage"
416366
exit 1

0 commit comments

Comments
 (0)