File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed
root/etc/s6-overlay/s6-rc.d/init-mod-code-server-julia-install Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 77 ENDPOINT : " linuxserver/mods" # don't modify
88 BASEIMAGE : " code-server" # replace
99 MODNAME : " julia" # replace
10+ MULTI_ARCH : " true" # set to true if needed
1011
1112jobs :
1213 set-vars :
1920 echo "ENDPOINT=${{ env.ENDPOINT }}" >> $GITHUB_OUTPUT
2021 echo "BASEIMAGE=${{ env.BASEIMAGE }}" >> $GITHUB_OUTPUT
2122 echo "MODNAME=${{ env.MODNAME }}" >> $GITHUB_OUTPUT
23+ echo "MULTI_ARCH=${{ env.MULTI_ARCH }}" >> $GITHUB_OUTPUT
2224 # **** If the mod needs to be versioned, set the versioning logic below. Otherwise leave as is. ****
2325 MOD_VERSION=$(curl -sL https://julialang.org/downloads/ | grep 'Current stable release:' | sed 's|.*Current stable release: v||' | sed 's| (.*||')
2426 echo "MOD_VERSION=${MOD_VERSION}" >> $GITHUB_OUTPUT
2729 ENDPOINT : ${{ steps.outputs.outputs.ENDPOINT }}
2830 BASEIMAGE : ${{ steps.outputs.outputs.BASEIMAGE }}
2931 MODNAME : ${{ steps.outputs.outputs.MODNAME }}
32+ MULTI_ARCH : ${{ steps.outputs.outputs.MULTI_ARCH }}
3033 MOD_VERSION : ${{ steps.outputs.outputs.MOD_VERSION }}
3134
3235 build :
4245 ENDPOINT : ${{ needs.set-vars.outputs.ENDPOINT }}
4346 BASEIMAGE : ${{ needs.set-vars.outputs.BASEIMAGE }}
4447 MODNAME : ${{ needs.set-vars.outputs.MODNAME }}
48+ MULTI_ARCH : ${{ needs.set-vars.outputs.MULTI_ARCH }}
4549 MOD_VERSION : ${{ needs.set-vars.outputs.MOD_VERSION }}
Original file line number Diff line number Diff line change @@ -13,12 +13,15 @@ RUN \
1313 fi && \
1414 JULIA_MIN_VERSION=$(echo "${MOD_VERSION}" | cut -d. -f 1,2) && \
1515 mkdir -p /root-layer/julia-bins && \
16- echo "**** Downloading x86_64 binary ****" && \
17- curl -fL "https://julialang-s3.julialang.org/bin/linux/x64/${JULIA_MIN_VERSION}/julia-${MOD_VERSION}-linux-x86_64.tar.gz" -o \
18- "/root-layer/julia-bins/julia-x86_64.tar.gz" && \
19- echo "**** Downloading aarch64 binary ****" && \
20- curl -fL "https://julialang-s3.julialang.org/bin/linux/aarch64/${JULIA_MIN_VERSION}/julia-${MOD_VERSION}-linux-aarch64.tar.gz" -o \
21- "/root-layer/julia-bins/julia-aarch64.tar.gz"
16+ if [ $(uname -m) = "x86_64" ]; then \
17+ echo "**** Downloading x86_64 binary ****" && \
18+ curl -fL "https://julialang-s3.julialang.org/bin/linux/x64/${JULIA_MIN_VERSION}/julia-${MOD_VERSION}-linux-x86_64.tar.gz" -o \
19+ "/root-layer/julia-bins/julia.tar.gz" ; \
20+ elif [ $(uname -m) = "aarch64" ]; then \
21+ echo "**** Downloading aarch64 binary ****" && \
22+ curl -fL "https://julialang-s3.julialang.org/bin/linux/aarch64/${JULIA_MIN_VERSION}/julia-${MOD_VERSION}-linux-aarch64.tar.gz" -o \
23+ "/root-layer/julia-bins/julia.tar.gz" ; \
24+ fi
2225
2326COPY root/ /root-layer/
2427
Original file line number Diff line number Diff line change 2323if [ -d "/julia-bins" ]; then
2424 echo "**** Installing/updating Julia ****"
2525 mkdir -p /julia
26- tar xf "/julia-bins/julia-${ARCH} .tar.gz" -C \
26+ tar xf "/julia-bins/julia.tar.gz" -C \
2727 /julia --strip-components=1
2828 rm -rf /usr/local/bin/julia
2929 ln -s /julia/bin/julia /usr/local/bin/julia
3030 chmod +x /julia/bin/julia
31+ rm -rf /julia-bins
3132else
3233 echo "**** Latest stable version of Julia already installed ****"
3334fi
You can’t perform that action at this time.
0 commit comments