Use curl instead of wget for Spark and Julia downloads (#1950)

Co-authored-by: Bjørn Jørgensen <bjornjorgensen@users.noreply.github.com>
This commit is contained in:
Ayaz Salikhov
2023-08-03 13:18:01 +04:00
committed by GitHub
parent 1d9e4f99a5
commit e1bd309263
4 changed files with 8 additions and 3 deletions

View File

@@ -71,6 +71,7 @@ It contains:
- Everything in `jupyter/base-notebook` - Everything in `jupyter/base-notebook`
- Common useful utilities like - Common useful utilities like
[curl](https://curl.se),
[git](https://git-scm.com/), [git](https://git-scm.com/),
[nano](https://www.nano-editor.org/) (actually `nano-tiny`), [nano](https://www.nano-editor.org/) (actually `nano-tiny`),
[tzdata](https://www.iana.org/time-zones), [tzdata](https://www.iana.org/time-zones),

View File

@@ -16,6 +16,7 @@ USER root
RUN apt-get update --yes && \ RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends \ apt-get install --yes --no-install-recommends \
# Common useful utilities # Common useful utilities
curl \
git \ git \
nano-tiny \ nano-tiny \
tzdata \ tzdata \

View File

@@ -22,7 +22,8 @@ JULIA_MAJOR_MINOR=$(echo "${JULIA_VERSION}" | cut -d. -f 1,2)
# Download and install Julia # Download and install Julia
cd /tmp cd /tmp
mkdir "/opt/julia-${JULIA_VERSION}" mkdir "/opt/julia-${JULIA_VERSION}"
wget --progress=dot:giga "https://julialang-s3.julialang.org/bin/linux/${JULIA_SHORT_ARCH}/${JULIA_MAJOR_MINOR}/${JULIA_INSTALLER}" curl --progress-bar --location --output "${JULIA_INSTALLER}" \
"https://julialang-s3.julialang.org/bin/linux/${JULIA_SHORT_ARCH}/${JULIA_MAJOR_MINOR}/${JULIA_INSTALLER}"
tar xzf "${JULIA_INSTALLER}" -C "/opt/julia-${JULIA_VERSION}" --strip-components=1 tar xzf "${JULIA_INSTALLER}" -C "/opt/julia-${JULIA_VERSION}" --strip-components=1
rm "${JULIA_INSTALLER}" rm "${JULIA_INSTALLER}"

View File

@@ -36,9 +36,11 @@ WORKDIR /tmp
# You need to use https://archive.apache.org/dist/ website if you want to download old Spark versions # You need to use https://archive.apache.org/dist/ website if you want to download old Spark versions
# But it seems to be slower, that's why we use recommended site for download # But it seems to be slower, that's why we use recommended site for download
RUN if [ -z "${scala_version}" ]; then \ RUN if [ -z "${scala_version}" ]; then \
wget --progress=dot:giga -O "spark.tgz" "https://dlcdn.apache.org/spark/spark-${APACHE_SPARK_VERSION}/spark-${APACHE_SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}.tgz"; \ curl --progress-bar --location --output "spark.tgz" \
"https://dlcdn.apache.org/spark/spark-${APACHE_SPARK_VERSION}/spark-${APACHE_SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}.tgz"; \
else \ else \
wget --progress=dot:giga -O "spark.tgz" "https://dlcdn.apache.org/spark/spark-${APACHE_SPARK_VERSION}/spark-${APACHE_SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala${scala_version}.tgz"; \ curl --progress-bar --location --output "spark.tgz" \
"https://dlcdn.apache.org/spark/spark-${APACHE_SPARK_VERSION}/spark-${APACHE_SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala${scala_version}.tgz"; \
fi && \ fi && \
echo "${spark_checksum} *spark.tgz" | sha512sum -c - && \ echo "${spark_checksum} *spark.tgz" | sha512sum -c - && \
tar xzf "spark.tgz" -C /usr/local --owner root --group root --no-same-owner && \ tar xzf "spark.tgz" -C /usr/local --owner root --group root --no-same-owner && \