Skip to content

Commit

Permalink
Use curl instead of wget for Spark and Julia downloads (#1950)
Browse files Browse the repository at this point in the history
Co-authored-by: Bjørn Jørgensen <bjornjorgensen@users.noreply.github.com>
  • Loading branch information
mathbunnyru and bjornjorgensen committed Aug 3, 2023
1 parent 1d9e4f9 commit e1bd309
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/using/selecting.md
Expand Up @@ -71,6 +71,7 @@ It contains:

- Everything in `jupyter/base-notebook`
- Common useful utilities like
[curl](https://curl.se),
[git](https://git-scm.com/),
[nano](https://www.nano-editor.org/) (actually `nano-tiny`),
[tzdata](https://www.iana.org/time-zones),
Expand Down
1 change: 1 addition & 0 deletions minimal-notebook/Dockerfile
Expand Up @@ -16,6 +16,7 @@ USER root
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends \
# Common useful utilities
curl \
git \
nano-tiny \
tzdata \
Expand Down
3 changes: 2 additions & 1 deletion minimal-notebook/setup-scripts/setup-julia.bash
Expand Up @@ -22,7 +22,8 @@ JULIA_MAJOR_MINOR=$(echo "${JULIA_VERSION}" | cut -d. -f 1,2)
# Download and install Julia
cd /tmp
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
rm "${JULIA_INSTALLER}"

Expand Down
6 changes: 4 additions & 2 deletions pyspark-notebook/Dockerfile
Expand Up @@ -36,9 +36,11 @@ WORKDIR /tmp
# 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
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 \
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 && \
echo "${spark_checksum} *spark.tgz" | sha512sum -c - && \
tar xzf "spark.tgz" -C /usr/local --owner root --group root --no-same-owner && \
Expand Down

0 comments on commit e1bd309

Please sign in to comment.