mirror of
https://gitlab.com/Anson-Projects/projects.git
synced 2025-07-24 23:21:24 +00:00
Update julia
This commit is contained in:
37
Dockerfile
37
Dockerfile
@@ -1,17 +1,40 @@
|
||||
FROM ghcr.io/quarto-dev/quarto-full:1.5.22
|
||||
FROM ubuntu:22.04
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
ENV JULIA_VERSION=1.10.2 \
|
||||
JULIA_MAJOR_VERSION=1.10 \
|
||||
JULIA_PATH=/usr/local/julia
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
apt-utils dialog \
|
||||
git iproute2 procps lsb-release \
|
||||
python3 python3-pip \
|
||||
python3 python3-pip python3-dev \
|
||||
r-base \
|
||||
julia \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
gcc g++ \
|
||||
wget curl tar\
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Use a RUN command for architecture detection and conditional logic
|
||||
RUN wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.4.550/quarto-1.4.550-linux-$(if [ "$(uname -m)" = "x86_64" ]; then echo "amd64"; else echo "arm64"; fi).tar.gz -O quarto.tar.gz \
|
||||
&& tar -xzf quarto.tar.gz -C /opt \
|
||||
&& mkdir -p /opt/quarto \
|
||||
&& mv /opt/quarto-1.4.550/* /opt/quarto/ \
|
||||
&& ln -s /opt/quarto/bin/quarto /usr/local/bin/quarto \
|
||||
&& rm -rf quarto.tar.gz /opt/quarto-1.4.550
|
||||
|
||||
RUN python3 -m pip install jupyter
|
||||
|
||||
# Assuming Project.toml and Manifest.toml are copied to the correct locations
|
||||
COPY Project.toml /root/.julia/environments/v1.4/
|
||||
COPY Manifest.toml /root/.julia/environments/v1.4/
|
||||
|
||||
RUN curl -fsSL "https://julialang-s3.julialang.org/bin/linux/$(if [ "$(uname -m)" = "x86_64" ]; then echo "x64"; else echo "aarch64"; fi)/${JULIA_MAJOR_VERSION}/julia-${JULIA_VERSION}-linux-$(if [ "$(uname -m)" = "x86_64" ]; then echo "x86_64"; else echo "aarch64"; fi).tar.gz" -o julia.tar.gz \
|
||||
&& tar -xzf julia.tar.gz -C /tmp \
|
||||
&& mv /tmp/julia-${JULIA_VERSION} ${JULIA_PATH} \
|
||||
&& rm -rf julia.tar.gz /tmp/julia-${JULIA_VERSION} \
|
||||
&& ln -s ${JULIA_PATH}/bin/julia /usr/local/bin/julia
|
||||
|
||||
COPY Project.toml /root/.julia/environments/v${JULIA_MAJOR_VERSION}/
|
||||
COPY Manifest.toml /root/.julia/environments/v${JULIA_MAJOR_VERSION}/
|
||||
|
||||
RUN julia -e "using Pkg; Pkg.instantiate(); Pkg.precompile()"
|
||||
|
||||
ENV QUARTO_DENO_EXTRA_OPTIONS=--v8-flags=--stack-size=10000
|
Reference in New Issue
Block a user