repair julia kernel not work
This commit is contained in:
parent
4f1e93cbd6
commit
3de6ee1ef1
@ -1,269 +0,0 @@
|
||||
name: Build
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: runner
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
|
||||
- name: login gitea_registry
|
||||
uses: https://eoelab.org:1027/actions/login-action@v3
|
||||
with:
|
||||
registry: eoelab.org:1027
|
||||
username: ${{ secrets.USERNAME }}
|
||||
password: ${{ secrets.PASSWD }}
|
||||
|
||||
- name: py-c build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: python/cpu
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
- name: scipy-c build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: scipy/cpu
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:scipy-c
|
||||
|
||||
- name: pyai-c build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: pyai/cpu
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:pyai-c
|
||||
|
||||
- name: scrpy-c build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: scrpy
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:scrpy
|
||||
|
||||
- name: pyspark build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: pyspark
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:pyspark
|
||||
|
||||
- name: pyflink build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: pyflink
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:pyflink
|
||||
|
||||
- name: julia build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: julia
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:julia
|
||||
|
||||
- name: r build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: r
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:r
|
||||
|
||||
- name: novnc build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: novnc
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:novnc
|
||||
|
||||
- name: pyqt6 build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: pyqt6
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:pyqt6
|
||||
|
||||
- name: octave build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: octave
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:octave
|
||||
|
||||
- name: sagemath build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: sagemath
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:sage
|
||||
|
||||
- name: scilab build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: scilab
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:scilab
|
||||
|
||||
- name: maple build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: maple
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:maple
|
||||
|
||||
- name: mma build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: mathematica
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:mma
|
||||
|
||||
- name: matlab build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: matlab/minimal
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:matlab-minimal
|
||||
|
||||
- name: matlab-mcm build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: matlab/mcm
|
||||
tags: eoelab.org:1027/ben0i0d/jupyter:matlab-mcm
|
||||
|
||||
# Push:
|
||||
# runs-on: runner
|
||||
# needs: Build
|
||||
# steps:
|
||||
# - name: checkout code
|
||||
# uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
|
||||
# - name: login gitea_registry
|
||||
# uses: https://eoelab.org:1027/actions/login-action@v3
|
||||
# with:
|
||||
# username: ${{ secrets.USERNAME }}
|
||||
# password: ${{ secrets.PASSWD }}
|
||||
|
||||
# - name: py-c push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: python/cpu
|
||||
# tags: ben0i0d/jupyter:py-c
|
||||
|
||||
# - name: scipy push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: scipy/cpu
|
||||
# tags: ben0i0d/jupyter:scipy-c
|
||||
|
||||
# - name: pyai-c push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: pyai/cpu
|
||||
# tags: ben0i0d/jupyter:pyai-c
|
||||
|
||||
# - name: scrpy-c push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: scrpy
|
||||
# tags: ben0i0d/jupyter:scrpy
|
||||
|
||||
# - name: pyspark push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: pyspark
|
||||
# tags: ben0i0d/jupyter:pyspark
|
||||
|
||||
# - name: pyflink push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: pyflink
|
||||
# tags: ben0i0d/jupyter:pyflink
|
||||
|
||||
# - name: julia push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: julia
|
||||
# tags: ben0i0d/jupyter:julia
|
||||
|
||||
# - name: r push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: r
|
||||
# tags: ben0i0d/jupyter:r
|
||||
|
||||
# - name: novnc push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: novnc
|
||||
# tags: ben0i0d/jupyter:novnc
|
||||
|
||||
# - name: pyqt6 push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: pyqt6
|
||||
# tags: ben0i0d/jupyter:pyqt6
|
||||
|
||||
# - name: octave push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: octave
|
||||
# tags: ben0i0d/jupyter:octave
|
||||
|
||||
# - name: sagemath push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: sagemath
|
||||
# tags: ben0i0d/jupyter:sage
|
||||
|
||||
# - name: scilab push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: scilab
|
||||
# tags: ben0i0d/jupyter:scilab
|
||||
|
||||
# - name: maple push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: maple
|
||||
# tags: ben0i0d/jupyter:maple
|
||||
|
||||
# - name: mma push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: mathematica
|
||||
# tags: ben0i0d/jupyter:mma
|
||||
|
||||
# - name: matlab push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: matlab/minimal
|
||||
# tags: ben0i0d/jupyter:matlab-minimal
|
||||
|
||||
# - name: matlab-mcm push
|
||||
# uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
# with:
|
||||
# push: true
|
||||
# context: matlab/mcm
|
||||
# tags: ben0i0d/jupyter:matlab-mcm
|
||||
|
286
.gitea/workflows/Flow.yaml
Normal file
286
.gitea/workflows/Flow.yaml
Normal file
@ -0,0 +1,286 @@
|
||||
name: Flow
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Base:
|
||||
runs-on: runner
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: py-c build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: python/cpu
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:py-c
|
||||
|
||||
SCIPY_C:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: scipy-c build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: ScienceCompute/scipy/cpu
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:scipy-c
|
||||
|
||||
PYAI_C:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: pyai-c build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: ScienceCompute/pyai/cpu
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:pyai-c
|
||||
|
||||
SCRPY_C:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: scrpy-c build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: BigData/scrpy
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:scrpy
|
||||
|
||||
SQL:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: scrpy-c build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: BigData/sql
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:sql
|
||||
|
||||
PYSPARK:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: pyspark build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: BigData/pyspark
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:pyspark
|
||||
|
||||
PYFLINK:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: pyflink build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: BigData/pyflink
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:pyflink
|
||||
|
||||
AGDA:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
|
||||
ANSIBLE:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: ansible build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Program/ansible
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:ansible
|
||||
|
||||
C:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: c build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Program/c
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:c
|
||||
|
||||
CADABRA:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
|
||||
CHAPEL:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
|
||||
CPP:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
|
||||
JULIA:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: julia build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Program/julia
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:julia
|
||||
|
||||
R:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: r build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Program/r
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:r
|
||||
|
||||
NOVNC:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: novnc build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Gui/novnc
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:novnc
|
||||
|
||||
PYQT6:
|
||||
runs-on: runner
|
||||
needs: NOVNC
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: pyqt6 build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Gui/pyqt6
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:pyqt6
|
||||
|
||||
OCTAVE:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: octave build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Math/octave
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:octave
|
||||
|
||||
SAGEMATH:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: sagemath build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Math/sagemath
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:sage
|
||||
|
||||
SCILAB:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: scilab build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Math/scilab
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:scilab
|
||||
|
||||
MAPLE:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: maple build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Math/maple
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:maple
|
||||
|
||||
MMA:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: mma build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Math/mathematica
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:mma
|
||||
|
||||
MATLAB_MINIMAL:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: matlab build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Math/matlab/minimal
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:matlab-minimal
|
||||
|
||||
MATLAB_MCM:
|
||||
runs-on: runner
|
||||
needs: MATLAB_MINIMAL
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: matlab-mcm build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Math/matlab/mcm
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:matlab-mcm
|
||||
|
||||
|
||||
Push:
|
||||
runs-on: runner
|
||||
needs: [ANSIBLE] #MATLAB_MCM, MAPLE, MMA
|
||||
steps:
|
||||
- name: login gitea_registry
|
||||
uses: https://eoelab.org:1027/actions/login-action@v3
|
||||
with:
|
||||
registry: eoelab.org:1027
|
||||
username: ${{ secrets.USERNAME }}
|
||||
password: ${{ secrets.PASSWD }}
|
||||
- name: push images to gitea_registry
|
||||
run: docker image push "eoelab.org:1027/${{ gitea.repository }}" --all-tags
|
||||
|
@ -30,7 +30,7 @@ RUN apt-get update --yes && \
|
||||
|
||||
USER ${NB_UID}
|
||||
|
||||
# Install pyarrow+findspark
|
||||
# Install pyarrow+findspark+duckdb
|
||||
RUN pip install 'pyspark' 'findspark' && \
|
||||
pip cache purge
|
||||
|
4
BigData/sql/Dockerfile
Normal file
4
BigData/sql/Dockerfile
Normal file
@ -0,0 +1,4 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
RUN pip install duckdb duckdb_kernel && \
|
||||
pip cache purge
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
20
Program/agda/Dockerfile
Normal file
20
Program/agda/Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
USER root
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
RUN apt-get update --yes && \
|
||||
apt-get install --yes --no-install-recommends make && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
git clone --depth=1 https://eoelab.org:1031/mirrored-sources/agda-kernel.git && cd agda-kernel && \
|
||||
pip install --no-cache-dir agda_kernel && \
|
||||
python -m agda_kernel.install && \
|
||||
make codemirror-install
|
||||
|
||||
USER ${NB_UID}
|
||||
WORKDIR "${HOME}"
|
||||
|
||||
|
||||
|
||||
|
4
Program/ansible/Dockerfile
Normal file
4
Program/ansible/Dockerfile
Normal file
@ -0,0 +1,4 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
RUN pip install ansible-kernel && \
|
||||
python -m ansible_kernel.install
|
21
Program/c/Dockerfile
Normal file
21
Program/c/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c AS builder
|
||||
|
||||
USER root
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
RUN apt-get update --yes && apt-get install --yes --no-install-recommends git && apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
git clone --depth 1 https://eoelab.org:1027/mirrors/jupyter-c-kernel.git
|
||||
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
COPY --chown="${NB_UID}:${NB_GID}" --from=builder /opt/jupyter-c-kernel/ /opt/jupyter-c-kernel/
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update --yes && apt-get install --yes gcc && apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
USER ${NB_UID}
|
||||
|
||||
RUN cd /opt/jupyter-c-kernel && pip install -e . && \
|
||||
cd jupyter_c_kernel && install_c_kernel --sys-prefix
|
17
Program/cadabra/Dockerfile
Normal file
17
Program/cadabra/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
|
||||
|
||||
USER root
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
RUN apt-get update --yes && \
|
||||
apt-get install --yes --no-install-recommends cadabra2 && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
USER ${NB_UID}
|
||||
WORKDIR "${HOME}"
|
||||
|
||||
|
||||
|
24
Program/chapel/Dockerfile
Normal file
24
Program/chapel/Dockerfile
Normal file
@ -0,0 +1,24 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
COPY chapel-1.31.0.tar.gz ./
|
||||
|
||||
USER root
|
||||
|
||||
ENV PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${PATH}" \
|
||||
CHPL_LIB_PIC=shared
|
||||
|
||||
RUN apt-get update --yes && \
|
||||
apt-get install --yes --no-install-recommends gcc g++ m4 perl make mawk pkg-config cmake \
|
||||
llvm-dev llvm clang libclang-dev libclang-cpp-dev libedit-dev && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
tar -xzf chapel-1.31.0.tar.gz && \
|
||||
cd chapel-1.31.0 && \
|
||||
source util/quickstart/setchplenv.bash && make && \
|
||||
pip install --no-cache-dir jupyter-kernel-chapel
|
||||
|
||||
USER ${NB_UID}
|
||||
WORKDIR "${HOME}"
|
3
Program/chapel/chapel-1.31.0.tar.gz
Normal file
3
Program/chapel/chapel-1.31.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4b861c9a354f6fcf66081256f7ec703d6dd2cd68ea363b400d10ac00bf308679
|
||||
size 87940930
|
13
Program/cpp/Dockerfile
Normal file
13
Program/cpp/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update --yes && \
|
||||
apt-get install --yes g++ && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
USER ${NB_UID}
|
||||
|
||||
# Install Cpp kernel
|
||||
RUN mamba install --yes -c conda-forge xeus-cling && \
|
||||
mamba clean --all -f -y
|
19
Program/dotnet/Dockerfile
Normal file
19
Program/dotnet/Dockerfile
Normal file
@ -0,0 +1,19 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
|
||||
|
||||
USER root
|
||||
# Install Dotnet SDK+Runtime + kernel
|
||||
ENV PATH ${PATH}:/opt/dotnet/tools
|
||||
RUN mkdir -p /opt/dotnet/tools && \
|
||||
wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
|
||||
sudo dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb && \
|
||||
apt-get update && apt-get install -y --no-install-recommends dotnet-sdk-7.0 && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
dotnet tool install Microsoft.dotnet-interactive --tool-path /opt/dotnet/tools && \
|
||||
dotnet interactive jupyter install && \
|
||||
fix-permissions /opt/dotnet && \
|
||||
fix-permissions "${CONDA_DIR}" && \
|
||||
fix-permissions "/home/${NB_USER}"
|
||||
|
||||
USER $NB_USER
|
18
Program/dyalog/Dockerfile
Normal file
18
Program/dyalog/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
|
||||
|
||||
USER root
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
COPY linux_64_18.2.45405_unicode.x86_64.deb ./
|
||||
|
||||
RUN dpkg -i linux_64_18.2.45405_unicode.x86_64.deb && \
|
||||
rm linux_64_18.2.45405_unicode.x86_64.deb && \
|
||||
pip install dyalog-jupyter-kernel
|
||||
|
||||
USER ${NB_UID}
|
||||
WORKDIR "${HOME}"
|
||||
|
||||
|
3
Program/dyalog/linux_64_18.2.45405_unicode.x86_64.deb
Normal file
3
Program/dyalog/linux_64_18.2.45405_unicode.x86_64.deb
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a40fd619303a62fc06e0c82a6e23c12ca48a3ed2c640cec1ccae819b2cf9a663
|
||||
size 190690700
|
12
Program/fortran/Dockerfile
Normal file
12
Program/fortran/Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
|
||||
|
||||
USER root
|
||||
# Install fortran kernel
|
||||
RUN mamba install --yes -c conda-forge lfortran && \
|
||||
mamba clean --all -f -y && \
|
||||
fix-permissions "${CONDA_DIR}" && \
|
||||
fix-permissions "/home/${NB_USER}"
|
||||
|
||||
USER ${NB_UID}
|
23
Program/go/Dockerfile
Normal file
23
Program/go/Dockerfile
Normal file
@ -0,0 +1,23 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
|
||||
|
||||
USER root
|
||||
# Install system dependencies
|
||||
RUN mkdir -p /opt/go && \
|
||||
apt-get update && apt-get install -yq --no-install-recommends golang gcc libc6-dev && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct && \
|
||||
go env -w GOPATH=/opt/go && \
|
||||
go install github.com/gopherdata/gophernotes@v0.7.5 && \
|
||||
mkdir -p /opt/conda/share/jupyter/kernels/gophernotes && \
|
||||
cd /opt/conda/share/jupyter/kernels/gophernotes && \
|
||||
cp "$(go env GOPATH)"/pkg/mod/github.com/gopherdata/gophernotes@v0.7.5/kernel/* "." && \
|
||||
chmod +w ./kernel.json && \
|
||||
# in case copied kernel.json has no write permission
|
||||
sed "s|gophernotes|$(go env GOPATH)/bin/gophernotes|" < kernel.json.in > kernel.json && \
|
||||
fix-permissions /opt/go && \
|
||||
fix-permissions "${CONDA_DIR}" && \
|
||||
fix-permissions "/home/${NB_USER}"
|
||||
|
||||
USER $NB_USER
|
69
Program/haskell/Dockerfile
Normal file
69
Program/haskell/Dockerfile
Normal file
@ -0,0 +1,69 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
# Extra arguments to `stack build`. Used to build --fast, see Makefile.
|
||||
ARG STACK_ARGS=
|
||||
ARG STACK_BINDIST="stack-2.11.1-linux-x86_64"
|
||||
|
||||
|
||||
|
||||
USER root
|
||||
|
||||
ENV PATH="/opt/bin:/opt/ghc/bin:${PATH}" \
|
||||
STACK_ROOT=/opt/stack
|
||||
|
||||
# Stack global non-project-specific config stack.config.yaml
|
||||
# Stack global project stack.yaml
|
||||
COPY stack.config.yaml /etc/stack/config.yaml
|
||||
COPY global-hints.yaml /etc/stack/global-hints-cache.yaml
|
||||
COPY stack-2.11.1-linux-x86_64.tar.gz /tmp/stack-2.11.1-linux-x86_64.tar.gz
|
||||
COPY global-project.stack.yaml $STACK_ROOT/global-project/stack.yaml
|
||||
|
||||
|
||||
RUN fix-permissions $STACK_ROOT && fix-permissions /etc/stack/ && \
|
||||
# Install system dependencies
|
||||
apt-get update && apt-get install -yq --no-install-recommends python3-pip libtinfo-dev libzmq3-dev libcairo2-dev libpango1.0-dev \
|
||||
libmagic-dev libblas-dev liblapack-dev libffi-dev libgmp-dev gnupg netbase graphviz gnuplot-nox \
|
||||
g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev less && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
# Stack Linux (generic) Manual download
|
||||
cd /tmp && tar zxf ${STACK_BINDIST}.tar.gz && cp ${STACK_BINDIST}/stack /usr/bin/stack && \
|
||||
rm -rf ${STACK_BINDIST}.tar.gz ${STACK_BINDIST} && \
|
||||
chown --recursive $NB_UID:users $STACK_ROOT/global-project && \
|
||||
fix-permissions $STACK_ROOT/global-project && \
|
||||
# Clone IHaskell and install ghc from the IHaskell resolver
|
||||
cd /opt && \
|
||||
curl -L "https://eoelab.org:1031/mirrored-sources/IHaskell/-/archive/master/IHaskell-master.tar.gz" | tar xzf - && mv *IHaskell* IHaskell && \
|
||||
curl -L "https://eoelab.org:1031/mirrored-sources/hvega/-/archive/main/hvega-main.tar.gz" | tar xzf - && mv *hvega* hvega && \
|
||||
fix-permissions /opt/IHaskell && \
|
||||
fix-permissions $STACK_ROOT && \
|
||||
fix-permissions /opt/hvega && \
|
||||
mkdir -p $HOME/.cabal && \
|
||||
echo "repository mirrors.ustc.edu.cn\n url: https://mirrors.ustc.edu.cn/hackage/\n secure: True" > $HOME/.cabal/config && \
|
||||
stack setup && \
|
||||
fix-permissions $STACK_ROOT && \
|
||||
rm /opt/stack/programs/x86_64-linux/ghc*.tar.xz && \
|
||||
# Build IHaskell
|
||||
# Note that we are NOT in the /opt/IHaskell directory here, we are installing ihaskell via the paths given in /opt/stack/global-project/stack.yaml
|
||||
stack build $STACK_ARGS ihaskell && \
|
||||
fix-permissions /opt/IHaskell && \
|
||||
fix-permissions $STACK_ROOT && \
|
||||
# Install IHaskell.Display libraries
|
||||
stack build $STACK_ARGS ihaskell-charts && \
|
||||
stack build $STACK_ARGS ihaskell-widgets && \
|
||||
stack build $STACK_ARGS hvega && \
|
||||
stack build $STACK_ARGS ihaskell-hvega && \
|
||||
fix-permissions $STACK_ROOT && \
|
||||
# Fix for https://github.com/IHaskell/ihaskell-notebook/issues/14#issuecomment-636334824
|
||||
fix-permissions /opt/IHaskell && \
|
||||
fix-permissions /opt/hvega && \
|
||||
# Install system-level ghc using the ghc which was installed by stack.using the IHaskell resolver.
|
||||
mkdir -p /opt/ghc && ln -s `stack path --compiler-bin` /opt/ghc/bin && \
|
||||
fix-permissions /opt/ghc && \
|
||||
fix-permissions "${CONDA_DIR}" && \
|
||||
fix-permissions "/home/${NB_USER}"
|
||||
|
||||
# Switch back to jovyan user
|
||||
USER $NB_UID
|
||||
RUN stack exec ihaskell -- install --stack --prefix=/opt/conda/
|
||||
|
||||
|
1688
Program/haskell/global-hints.yaml
Normal file
1688
Program/haskell/global-hints.yaml
Normal file
File diff suppressed because it is too large
Load Diff
49
Program/haskell/global-project.stack.yaml
Normal file
49
Program/haskell/global-project.stack.yaml
Normal file
@ -0,0 +1,49 @@
|
||||
# Copyright (c) James Brock.
|
||||
# Distributed under the terms of the Modified MIT License.
|
||||
resolver: nightly-2023-05-17
|
||||
# GHC 9.4.5
|
||||
|
||||
# Stack global project /opt/stack/global-project/stack.yaml in the Docker image.
|
||||
# https://docs.haskellstack.org/en/stable/yaml_configuration/#yaml-configuration
|
||||
|
||||
# All the IHaskell packages are listed as extra-deps rather than packages,
|
||||
# because we never want to build anything automatically, we always want to
|
||||
# select exactly what we build for the IHaskell notebook environment.
|
||||
# For example, `stack ghci` tries to load every package listed in `packages`,
|
||||
# and we don't want that behavior. Several of these packages are unbuildable
|
||||
# at the time of this writing. See the Dockerfile for the list of packages
|
||||
# which are pre-built into the Docker image.
|
||||
#
|
||||
# To make an notebook project with custom `stack.yaml`, copy this `stack.yaml`
|
||||
# file into the project directory that has the `.ipynb` notebook file and
|
||||
# then make changes to the copied `stack.yaml`.
|
||||
|
||||
packages: []
|
||||
extra-deps:
|
||||
- /opt/IHaskell
|
||||
- /opt/IHaskell/ipython-kernel
|
||||
- /opt/IHaskell/ghc-parser
|
||||
- /opt/IHaskell/ihaskell-display/ihaskell-aeson
|
||||
- /opt/IHaskell/ihaskell-display/ihaskell-blaze
|
||||
- /opt/IHaskell/ihaskell-display/ihaskell-charts
|
||||
- /opt/IHaskell/ihaskell-display/ihaskell-diagrams
|
||||
- /opt/IHaskell/ihaskell-display/ihaskell-gnuplot
|
||||
- /opt/IHaskell/ihaskell-display/ihaskell-graphviz
|
||||
- /opt/IHaskell/ihaskell-display/ihaskell-hatex
|
||||
- /opt/IHaskell/ihaskell-display/ihaskell-juicypixels
|
||||
- /opt/IHaskell/ihaskell-display/ihaskell-magic
|
||||
- /opt/IHaskell/ihaskell-display/ihaskell-plot
|
||||
- /opt/IHaskell/ihaskell-display/ihaskell-rlangqq
|
||||
- /opt/IHaskell/ihaskell-display/ihaskell-static-canvas
|
||||
- /opt/IHaskell/ihaskell-display/ihaskell-widgets
|
||||
- /opt/hvega/hvega
|
||||
- /opt/hvega/ihaskell-hvega
|
||||
|
||||
- Chart-cairo-1.9.3
|
||||
- cairo-0.13.10.0
|
||||
- diagrams-cairo-1.4.2
|
||||
- pango-0.13.10.0
|
||||
- glib-0.13.10.0
|
||||
- gtk2hs-buildtools-0.13.10.0
|
||||
- plot-0.2.3.11
|
||||
|
3
Program/haskell/stack-2.11.1-linux-x86_64.tar.gz
Normal file
3
Program/haskell/stack-2.11.1-linux-x86_64.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:408a120e824ed6e6b24c548a2ff6f210fcb0eed246f204a280ed4c75af0517e7
|
||||
size 15552491
|
37
Program/haskell/stack.config.yaml
Normal file
37
Program/haskell/stack.config.yaml
Normal file
@ -0,0 +1,37 @@
|
||||
# Haskell Stack non-project-specific config for IHaskell.
|
||||
# https://docs.haskellstack.org/en/stable/yaml_configuration/#non-project-specific-config
|
||||
setup-info-locations:
|
||||
- http://mirrors.ustc.edu.cn/stackage/stack-setup.yaml
|
||||
urls:
|
||||
latest-snapshot: http://mirrors.ustc.edu.cn/stackage/snapshots.json
|
||||
snapshot-location-base: http://mirrors.ustc.edu.cn/stackage/stackage-snapshots/
|
||||
|
||||
package-index:
|
||||
download-prefix: https://mirrors.ustc.edu.cn/hackage/
|
||||
hackage-security:
|
||||
keyids:
|
||||
- 0a5c7ea47cd1b15f01f5f51a33adda7e655bc0f0b0615baa8e271f4c3351e21d
|
||||
- 1ea9ba32c526d1cc91ab5e5bd364ec5e9e8cb67179a471872f6e26f0ae773d42
|
||||
- 280b10153a522681163658cb49f632cde3f38d768b736ddbc901d99a1a772833
|
||||
- 2a96b1889dc221c17296fcc2bb34b908ca9734376f0f361660200935916ef201
|
||||
- 2c6c3627bd6c982990239487f1abd02e08a02e6cf16edb105a8012d444d870c3
|
||||
- 51f0161b906011b52c6613376b1ae937670da69322113a246a09f807c62f6921
|
||||
- 772e9f4c7db33d251d5c6e357199c819e569d130857dc225549b40845ff0890d
|
||||
- aa315286e6ad281ad61182235533c41e806e5a787e0b6d1e7eef3f09d137d2e9
|
||||
- fe331502606802feac15e514d9b9ea83fee8b6ffef71335479a2e68d84adc6b0
|
||||
key-threshold: 3 # number of keys required
|
||||
|
||||
# ignore expiration date, see https://github.com/commercialhaskell/stack/pull/4614
|
||||
ignore-expiry: true
|
||||
|
||||
# So that all users, not just jovyan, can use the Stack default global project.
|
||||
allow-different-user: true
|
||||
|
||||
# stack install products will go here, not in /home/$USER/.local/bin
|
||||
local-bin-path: /opt/bin
|
||||
|
||||
# We're going to be loosey with version bounds.
|
||||
allow-newer: true
|
||||
|
||||
# Force color
|
||||
color: always
|
17
Program/java/Dockerfile
Normal file
17
Program/java/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
|
||||
|
||||
USER root
|
||||
COPY ijava-1.3.0.zip ./ijava-kernel.zip
|
||||
# Install dependencies
|
||||
RUN apt update && apt install --yes --no-install-recommends openjdk-17-jdk && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
# Unpack and install the kernel
|
||||
unzip ijava-kernel.zip -d ijava-kernel && \
|
||||
cd ijava-kernel && \
|
||||
python3 install.py --sys-prefix && \
|
||||
rm ../ijava-kernel.zip
|
||||
|
||||
# Set user back to unpriviledged user.
|
||||
USER $NB_USER
|
3
Program/java/ijava-1.3.0.zip
Normal file
3
Program/java/ijava-1.3.0.zip
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:484cc62579cb77510b0f0c78283f043794396d8ae9d76a8f2ab5d7368ec246b2
|
||||
size 3366077
|
16
Program/js/Dockerfile
Normal file
16
Program/js/Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update --yes && \
|
||||
apt-get install --yes nodejs npm && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
npm config set registry https://registry.npmmirror.com && \
|
||||
npm install -g --unsafe-perm ijavascript && \
|
||||
ijsinstall --install=global
|
||||
|
||||
USER ${NB_UID}
|
||||
|
||||
|
@ -5,21 +5,24 @@ USER root
|
||||
# install Julia packages in /opt/julias
|
||||
RUN apt-get update --yes && apt-get install --yes --no-install-recommends gnupg && apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
pip --no-cache-dir install jill && jill install --confirm
|
||||
|
||||
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
COPY --chown="${NB_UID}:${NB_GID}" --from=builder /opt/julias/ /opt/julias/
|
||||
|
||||
ENV JULIA_PKG_SERVER=https://mirrors.cernet.edu.cn/julia \
|
||||
JULIA_NUM_THREADS=8
|
||||
|
||||
JULIA_NUM_THREADS=8 \
|
||||
JUPYTER_DATA_DIR=/opt/base/share/jupyter \
|
||||
JULIA_DEPOT_PATH=/opt/julia \
|
||||
JULIA_PKGDIR=/opt/julia
|
||||
|
||||
USER root
|
||||
|
||||
RUN ln -s "`find /opt/julias -name 'bin'`/julia" /usr/local/bin/julia
|
||||
RUN ln -s "`find /opt/julias -name 'bin'`/julia" /usr/local/bin/julia && \
|
||||
mkdir -p /opt/julia && chown -R ${NB_UID}:${NB_GID} /opt/julia
|
||||
|
||||
USER ${NB_UID}
|
||||
# Install IJulia as jovyan and then move the kernelspec out to the system share location.
|
||||
|
||||
# Install IJulia as jovyan
|
||||
RUN julia -e 'import Pkg; Pkg.update()' && \
|
||||
julia -e 'using Pkg; pkg"add IJulia"; pkg"precompile"' && \
|
||||
mv "${HOME}/.local/share/jupyter/kernels/"* "/opt/base/share/jupyter/kernels/" && \
|
||||
rm -rf "${HOME}/.local"
|
||||
julia -e 'using Pkg; pkg"add IJulia"; pkg"precompile"'
|
15
Program/kotlin/Dockerfile
Normal file
15
Program/kotlin/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends openjdk-17-jre && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
USER $NB_UID
|
||||
|
||||
ENV JUPYTER_ENABLE_LAB=yes
|
||||
|
||||
RUN mamba install --yes -c jetbrains kotlin-jupyter-kernel && \
|
||||
mamba clean --all -f -y
|
16
Program/lua/Dockerfile
Normal file
16
Program/lua/Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
|
||||
|
||||
USER root
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
RUN apt-get update --yes && \
|
||||
apt-get install --yes --no-install-recommends lua5.4 && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
pip install ilua
|
||||
|
||||
USER ${NB_UID}
|
||||
WORKDIR "${HOME}"
|
||||
|
29
Program/rust/Dockerfile
Normal file
29
Program/rust/Dockerfile
Normal file
@ -0,0 +1,29 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
|
||||
|
||||
USER root
|
||||
ENV CARGO_HOME=/opt/rust/.cargo \
|
||||
RUSTUP_HOME=/opt/rust/.rust \
|
||||
PATH=$PATH:/opt/rust/.cargo/bin \
|
||||
CARGO_HTTP_MULTIPLEXING=false
|
||||
|
||||
RUN mkdir -p /opt/rust/.cargo /opt/rust/.rust && \
|
||||
apt-get update --yes && \
|
||||
apt-get install --yes --no-install-recommends build-essential && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY rustup-init.sh /opt/rust/rustup-init.sh
|
||||
COPY config /opt/rust/.cargo/config
|
||||
|
||||
RUN bash /opt/rust/rustup-init.sh -y && \
|
||||
cargo install evcxr_jupyter && \
|
||||
evcxr_jupyter --install && \
|
||||
rm /opt/rust/rustup-init.sh && \
|
||||
cp -r $HOME/.local/share/jupyter/kernels/rust /opt/conda/share/jupyter/kernels/ && \
|
||||
rustup component add rust-src && \
|
||||
fix-permissions /opt/rust && \
|
||||
fix-permissions "${CONDA_DIR}" && \
|
||||
fix-permissions "/home/${NB_USER}"
|
||||
|
||||
USER $NB_USER
|
28
Program/rust/config
Normal file
28
Program/rust/config
Normal file
@ -0,0 +1,28 @@
|
||||
[source.crates-io]
|
||||
registry = "https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
# 指定镜像
|
||||
replace-with = 'ustc'
|
||||
|
||||
# 清华大学
|
||||
[source.tuna]
|
||||
registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"
|
||||
|
||||
# 中国科学技术大学
|
||||
[source.ustc]
|
||||
registry = "git://mirrors.ustc.edu.cn/crates.io-index"
|
||||
|
||||
# 上海交通大学
|
||||
[source.sjtu]
|
||||
registry = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index"
|
||||
|
||||
# rustcc社区
|
||||
[source.rustcc0]
|
||||
registry = "https://code.aliyun.com/rustcc/crates.io-index.git"
|
||||
|
||||
[source.rustcc1]
|
||||
registry="git://crates.rustcc.cn/crates.io-index"
|
||||
|
||||
[source.rustcc2]
|
||||
registry="git://crates.rustcc.com/crates.io-index"
|
||||
|
731
Program/rust/rustup-init.sh
Normal file
731
Program/rust/rustup-init.sh
Normal file
@ -0,0 +1,731 @@
|
||||
#!/bin/sh
|
||||
# shellcheck shell=dash
|
||||
|
||||
# This is just a little script that can be downloaded from the internet to
|
||||
# install rustup. It just does platform detection, downloads the installer
|
||||
# and runs it.
|
||||
|
||||
# It runs on Unix shells like {a,ba,da,k,z}sh. It uses the common `local`
|
||||
# extension. Note: Most shells limit `local` to 1 var per line, contra bash.
|
||||
|
||||
if [ "$KSH_VERSION" = 'Version JM 93t+ 2010-03-05' ]; then
|
||||
# The version of ksh93 that ships with many illumos systems does not
|
||||
# support the "local" extension. Print a message rather than fail in
|
||||
# subtle ways later on:
|
||||
echo 'rustup does not work with this ksh93 version; please try bash!' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
set -u
|
||||
|
||||
# If RUSTUP_UPDATE_ROOT is unset or empty, default it.
|
||||
RUSTUP_UPDATE_ROOT="${RUSTUP_UPDATE_ROOT:-https://static.rust-lang.org/rustup}"
|
||||
|
||||
# NOTICE: If you change anything here, please make the same changes in setup_mode.rs
|
||||
usage() {
|
||||
cat <<EOF
|
||||
rustup-init 1.26.0 (577bf51ae 2023-04-05)
|
||||
The installer for rustup
|
||||
|
||||
USAGE:
|
||||
rustup-init [OPTIONS]
|
||||
|
||||
OPTIONS:
|
||||
-v, --verbose
|
||||
Enable verbose output
|
||||
|
||||
-q, --quiet
|
||||
Disable progress output
|
||||
|
||||
-y
|
||||
Disable confirmation prompt.
|
||||
|
||||
--default-host <default-host>
|
||||
Choose a default host triple
|
||||
|
||||
--default-toolchain <default-toolchain>
|
||||
Choose a default toolchain to install. Use 'none' to not install any toolchains at all
|
||||
|
||||
--profile <profile>
|
||||
[default: default] [possible values: minimal, default, complete]
|
||||
|
||||
-c, --component <components>...
|
||||
Component name to also install
|
||||
|
||||
-t, --target <targets>...
|
||||
Target name to also install
|
||||
|
||||
--no-update-default-toolchain
|
||||
Don't update any existing default toolchain after install
|
||||
|
||||
--no-modify-path
|
||||
Don't configure the PATH environment variable
|
||||
|
||||
-h, --help
|
||||
Print help information
|
||||
|
||||
-V, --version
|
||||
Print version information
|
||||
EOF
|
||||
}
|
||||
|
||||
main() {
|
||||
downloader --check
|
||||
need_cmd uname
|
||||
need_cmd mktemp
|
||||
need_cmd chmod
|
||||
need_cmd mkdir
|
||||
need_cmd rm
|
||||
need_cmd rmdir
|
||||
|
||||
get_architecture || return 1
|
||||
local _arch="$RETVAL"
|
||||
assert_nz "$_arch" "arch"
|
||||
|
||||
local _ext=""
|
||||
case "$_arch" in
|
||||
*windows*)
|
||||
_ext=".exe"
|
||||
;;
|
||||
esac
|
||||
|
||||
local _url="${RUSTUP_UPDATE_ROOT}/dist/${_arch}/rustup-init${_ext}"
|
||||
|
||||
local _dir
|
||||
if ! _dir="$(ensure mktemp -d)"; then
|
||||
# Because the previous command ran in a subshell, we must manually
|
||||
# propagate exit status.
|
||||
exit 1
|
||||
fi
|
||||
local _file="${_dir}/rustup-init${_ext}"
|
||||
|
||||
local _ansi_escapes_are_valid=false
|
||||
if [ -t 2 ]; then
|
||||
if [ "${TERM+set}" = 'set' ]; then
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*|urxvt*|linux*|vt*)
|
||||
_ansi_escapes_are_valid=true
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
# check if we have to use /dev/tty to prompt the user
|
||||
local need_tty=yes
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--help)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
OPTIND=1
|
||||
if [ "${arg%%--*}" = "" ]; then
|
||||
# Long option (other than --help);
|
||||
# don't attempt to interpret it.
|
||||
continue
|
||||
fi
|
||||
while getopts :hy sub_arg "$arg"; do
|
||||
case "$sub_arg" in
|
||||
h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
y)
|
||||
# user wants to skip the prompt --
|
||||
# we don't need /dev/tty
|
||||
need_tty=no
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if $_ansi_escapes_are_valid; then
|
||||
printf "\33[1minfo:\33[0m downloading installer\n" 1>&2
|
||||
else
|
||||
printf '%s\n' 'info: downloading installer' 1>&2
|
||||
fi
|
||||
|
||||
ensure mkdir -p "$_dir"
|
||||
ensure downloader "$_url" "$_file" "$_arch"
|
||||
ensure chmod u+x "$_file"
|
||||
if [ ! -x "$_file" ]; then
|
||||
printf '%s\n' "Cannot execute $_file (likely because of mounting /tmp as noexec)." 1>&2
|
||||
printf '%s\n' "Please copy the file to a location where you can execute binaries and run ./rustup-init${_ext}." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$need_tty" = "yes" ] && [ ! -t 0 ]; then
|
||||
# The installer is going to want to ask for confirmation by
|
||||
# reading stdin. This script was piped into `sh` though and
|
||||
# doesn't have stdin to pass to its children. Instead we're going
|
||||
# to explicitly connect /dev/tty to the installer's stdin.
|
||||
if [ ! -t 1 ]; then
|
||||
err "Unable to run interactively. Run with -y to accept defaults, --help for additional options"
|
||||
fi
|
||||
|
||||
ignore "$_file" "$@" < /dev/tty
|
||||
else
|
||||
ignore "$_file" "$@"
|
||||
fi
|
||||
|
||||
local _retval=$?
|
||||
|
||||
ignore rm "$_file"
|
||||
ignore rmdir "$_dir"
|
||||
|
||||
return "$_retval"
|
||||
}
|
||||
|
||||
check_proc() {
|
||||
# Check for /proc by looking for the /proc/self/exe link
|
||||
# This is only run on Linux
|
||||
if ! test -L /proc/self/exe ; then
|
||||
err "fatal: Unable to find /proc/self/exe. Is /proc mounted? Installation cannot proceed without /proc."
|
||||
fi
|
||||
}
|
||||
|
||||
get_bitness() {
|
||||
need_cmd head
|
||||
# Architecture detection without dependencies beyond coreutils.
|
||||
# ELF files start out "\x7fELF", and the following byte is
|
||||
# 0x01 for 32-bit and
|
||||
# 0x02 for 64-bit.
|
||||
# The printf builtin on some shells like dash only supports octal
|
||||
# escape sequences, so we use those.
|
||||
local _current_exe_head
|
||||
_current_exe_head=$(head -c 5 /proc/self/exe )
|
||||
if [ "$_current_exe_head" = "$(printf '\177ELF\001')" ]; then
|
||||
echo 32
|
||||
elif [ "$_current_exe_head" = "$(printf '\177ELF\002')" ]; then
|
||||
echo 64
|
||||
else
|
||||
err "unknown platform bitness"
|
||||
fi
|
||||
}
|
||||
|
||||
is_host_amd64_elf() {
|
||||
need_cmd head
|
||||
need_cmd tail
|
||||
# ELF e_machine detection without dependencies beyond coreutils.
|
||||
# Two-byte field at offset 0x12 indicates the CPU,
|
||||
# but we're interested in it being 0x3E to indicate amd64, or not that.
|
||||
local _current_exe_machine
|
||||
_current_exe_machine=$(head -c 19 /proc/self/exe | tail -c 1)
|
||||
[ "$_current_exe_machine" = "$(printf '\076')" ]
|
||||
}
|
||||
|
||||
get_endianness() {
|
||||
local cputype=$1
|
||||
local suffix_eb=$2
|
||||
local suffix_el=$3
|
||||
|
||||
# detect endianness without od/hexdump, like get_bitness() does.
|
||||
need_cmd head
|
||||
need_cmd tail
|
||||
|
||||
local _current_exe_endianness
|
||||
_current_exe_endianness="$(head -c 6 /proc/self/exe | tail -c 1)"
|
||||
if [ "$_current_exe_endianness" = "$(printf '\001')" ]; then
|
||||
echo "${cputype}${suffix_el}"
|
||||
elif [ "$_current_exe_endianness" = "$(printf '\002')" ]; then
|
||||
echo "${cputype}${suffix_eb}"
|
||||
else
|
||||
err "unknown platform endianness"
|
||||
fi
|
||||
}
|
||||
|
||||
get_architecture() {
|
||||
local _ostype _cputype _bitness _arch _clibtype
|
||||
_ostype="$(uname -s)"
|
||||
_cputype="$(uname -m)"
|
||||
_clibtype="gnu"
|
||||
|
||||
if [ "$_ostype" = Linux ]; then
|
||||
if [ "$(uname -o)" = Android ]; then
|
||||
_ostype=Android
|
||||
fi
|
||||
if ldd --version 2>&1 | grep -q 'musl'; then
|
||||
_clibtype="musl"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$_ostype" = Darwin ] && [ "$_cputype" = i386 ]; then
|
||||
# Darwin `uname -m` lies
|
||||
if sysctl hw.optional.x86_64 | grep -q ': 1'; then
|
||||
_cputype=x86_64
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$_ostype" = SunOS ]; then
|
||||
# Both Solaris and illumos presently announce as "SunOS" in "uname -s"
|
||||
# so use "uname -o" to disambiguate. We use the full path to the
|
||||
# system uname in case the user has coreutils uname first in PATH,
|
||||
# which has historically sometimes printed the wrong value here.
|
||||
if [ "$(/usr/bin/uname -o)" = illumos ]; then
|
||||
_ostype=illumos
|
||||
fi
|
||||
|
||||
# illumos systems have multi-arch userlands, and "uname -m" reports the
|
||||
# machine hardware name; e.g., "i86pc" on both 32- and 64-bit x86
|
||||
# systems. Check for the native (widest) instruction set on the
|
||||
# running kernel:
|
||||
if [ "$_cputype" = i86pc ]; then
|
||||
_cputype="$(isainfo -n)"
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$_ostype" in
|
||||
|
||||
Android)
|
||||
_ostype=linux-android
|
||||
;;
|
||||
|
||||
Linux)
|
||||
check_proc
|
||||
_ostype=unknown-linux-$_clibtype
|
||||
_bitness=$(get_bitness)
|
||||
;;
|
||||
|
||||
FreeBSD)
|
||||
_ostype=unknown-freebsd
|
||||
;;
|
||||
|
||||
NetBSD)
|
||||
_ostype=unknown-netbsd
|
||||
;;
|
||||
|
||||
DragonFly)
|
||||
_ostype=unknown-dragonfly
|
||||
;;
|
||||
|
||||
Darwin)
|
||||
_ostype=apple-darwin
|
||||
;;
|
||||
|
||||
illumos)
|
||||
_ostype=unknown-illumos
|
||||
;;
|
||||
|
||||
MINGW* | MSYS* | CYGWIN* | Windows_NT)
|
||||
_ostype=pc-windows-gnu
|
||||
;;
|
||||
|
||||
*)
|
||||
err "unrecognized OS type: $_ostype"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
case "$_cputype" in
|
||||
|
||||
i386 | i486 | i686 | i786 | x86)
|
||||
_cputype=i686
|
||||
;;
|
||||
|
||||
xscale | arm)
|
||||
_cputype=arm
|
||||
if [ "$_ostype" = "linux-android" ]; then
|
||||
_ostype=linux-androideabi
|
||||
fi
|
||||
;;
|
||||
|
||||
armv6l)
|
||||
_cputype=arm
|
||||
if [ "$_ostype" = "linux-android" ]; then
|
||||
_ostype=linux-androideabi
|
||||
else
|
||||
_ostype="${_ostype}eabihf"
|
||||
fi
|
||||
;;
|
||||
|
||||
armv7l | armv8l)
|
||||
_cputype=armv7
|
||||
if [ "$_ostype" = "linux-android" ]; then
|
||||
_ostype=linux-androideabi
|
||||
else
|
||||
_ostype="${_ostype}eabihf"
|
||||
fi
|
||||
;;
|
||||
|
||||
aarch64 | arm64)
|
||||
_cputype=aarch64
|
||||
;;
|
||||
|
||||
x86_64 | x86-64 | x64 | amd64)
|
||||
_cputype=x86_64
|
||||
;;
|
||||
|
||||
mips)
|
||||
_cputype=$(get_endianness mips '' el)
|
||||
;;
|
||||
|
||||
mips64)
|
||||
if [ "$_bitness" -eq 64 ]; then
|
||||
# only n64 ABI is supported for now
|
||||
_ostype="${_ostype}abi64"
|
||||
_cputype=$(get_endianness mips64 '' el)
|
||||
fi
|
||||
;;
|
||||
|
||||
ppc)
|
||||
_cputype=powerpc
|
||||
;;
|
||||
|
||||
ppc64)
|
||||
_cputype=powerpc64
|
||||
;;
|
||||
|
||||
ppc64le)
|
||||
_cputype=powerpc64le
|
||||
;;
|
||||
|
||||
s390x)
|
||||
_cputype=s390x
|
||||
;;
|
||||
riscv64)
|
||||
_cputype=riscv64gc
|
||||
;;
|
||||
loongarch64)
|
||||
_cputype=loongarch64
|
||||
;;
|
||||
*)
|
||||
err "unknown CPU type: $_cputype"
|
||||
|
||||
esac
|
||||
|
||||
# Detect 64-bit linux with 32-bit userland
|
||||
if [ "${_ostype}" = unknown-linux-gnu ] && [ "${_bitness}" -eq 32 ]; then
|
||||
case $_cputype in
|
||||
x86_64)
|
||||
if [ -n "${RUSTUP_CPUTYPE:-}" ]; then
|
||||
_cputype="$RUSTUP_CPUTYPE"
|
||||
else {
|
||||
# 32-bit executable for amd64 = x32
|
||||
if is_host_amd64_elf; then {
|
||||
echo "This host is running an x32 userland; as it stands, x32 support is poor," 1>&2
|
||||
echo "and there isn't a native toolchain -- you will have to install" 1>&2
|
||||
echo "multiarch compatibility with i686 and/or amd64, then select one" 1>&2
|
||||
echo "by re-running this script with the RUSTUP_CPUTYPE environment variable" 1>&2
|
||||
echo "set to i686 or x86_64, respectively." 1>&2
|
||||
echo 1>&2
|
||||
echo "You will be able to add an x32 target after installation by running" 1>&2
|
||||
echo " rustup target add x86_64-unknown-linux-gnux32" 1>&2
|
||||
exit 1
|
||||
}; else
|
||||
_cputype=i686
|
||||
fi
|
||||
}; fi
|
||||
;;
|
||||
mips64)
|
||||
_cputype=$(get_endianness mips '' el)
|
||||
;;
|
||||
powerpc64)
|
||||
_cputype=powerpc
|
||||
;;
|
||||
aarch64)
|
||||
_cputype=armv7
|
||||
if [ "$_ostype" = "linux-android" ]; then
|
||||
_ostype=linux-androideabi
|
||||
else
|
||||
_ostype="${_ostype}eabihf"
|
||||
fi
|
||||
;;
|
||||
riscv64gc)
|
||||
err "riscv64 with 32-bit userland unsupported"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Detect armv7 but without the CPU features Rust needs in that build,
|
||||
# and fall back to arm.
|
||||
# See https://github.com/rust-lang/rustup.rs/issues/587.
|
||||
if [ "$_ostype" = "unknown-linux-gnueabihf" ] && [ "$_cputype" = armv7 ]; then
|
||||
if ensure grep '^Features' /proc/cpuinfo | grep -q -v neon; then
|
||||
# At least one processor does not have NEON.
|
||||
_cputype=arm
|
||||
fi
|
||||
fi
|
||||
|
||||
_arch="${_cputype}-${_ostype}"
|
||||
|
||||
RETVAL="$_arch"
|
||||
}
|
||||
|
||||
say() {
|
||||
printf 'rustup: %s\n' "$1"
|
||||
}
|
||||
|
||||
err() {
|
||||
say "$1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
need_cmd() {
|
||||
if ! check_cmd "$1"; then
|
||||
err "need '$1' (command not found)"
|
||||
fi
|
||||
}
|
||||
|
||||
check_cmd() {
|
||||
command -v "$1" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
assert_nz() {
|
||||
if [ -z "$1" ]; then err "assert_nz $2"; fi
|
||||
}
|
||||
|
||||
# Run a command that should never fail. If the command fails execution
|
||||
# will immediately terminate with an error showing the failing
|
||||
# command.
|
||||
ensure() {
|
||||
if ! "$@"; then err "command failed: $*"; fi
|
||||
}
|
||||
|
||||
# This is just for indicating that commands' results are being
|
||||
# intentionally ignored. Usually, because it's being executed
|
||||
# as part of error handling.
|
||||
ignore() {
|
||||
"$@"
|
||||
}
|
||||
|
||||
# This wraps curl or wget. Try curl first, if not installed,
|
||||
# use wget instead.
|
||||
downloader() {
|
||||
local _dld
|
||||
local _ciphersuites
|
||||
local _err
|
||||
local _status
|
||||
local _retry
|
||||
if check_cmd curl; then
|
||||
_dld=curl
|
||||
elif check_cmd wget; then
|
||||
_dld=wget
|
||||
else
|
||||
_dld='curl or wget' # to be used in error message of need_cmd
|
||||
fi
|
||||
|
||||
if [ "$1" = --check ]; then
|
||||
need_cmd "$_dld"
|
||||
elif [ "$_dld" = curl ]; then
|
||||
check_curl_for_retry_support
|
||||
_retry="$RETVAL"
|
||||
get_ciphersuites_for_curl
|
||||
_ciphersuites="$RETVAL"
|
||||
if [ -n "$_ciphersuites" ]; then
|
||||
_err=$(curl $_retry --proto '=https' --tlsv1.2 --ciphers "$_ciphersuites" --silent --show-error --fail --location "$1" --output "$2" 2>&1)
|
||||
_status=$?
|
||||
else
|
||||
echo "Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure"
|
||||
if ! check_help_for "$3" curl --proto --tlsv1.2; then
|
||||
echo "Warning: Not enforcing TLS v1.2, this is potentially less secure"
|
||||
_err=$(curl $_retry --silent --show-error --fail --location "$1" --output "$2" 2>&1)
|
||||
_status=$?
|
||||
else
|
||||
_err=$(curl $_retry --proto '=https' --tlsv1.2 --silent --show-error --fail --location "$1" --output "$2" 2>&1)
|
||||
_status=$?
|
||||
fi
|
||||
fi
|
||||
if [ -n "$_err" ]; then
|
||||
echo "$_err" >&2
|
||||
if echo "$_err" | grep -q 404$; then
|
||||
err "installer for platform '$3' not found, this may be unsupported"
|
||||
fi
|
||||
fi
|
||||
return $_status
|
||||
elif [ "$_dld" = wget ]; then
|
||||
if [ "$(wget -V 2>&1|head -2|tail -1|cut -f1 -d" ")" = "BusyBox" ]; then
|
||||
echo "Warning: using the BusyBox version of wget. Not enforcing strong cipher suites for TLS or TLS v1.2, this is potentially less secure"
|
||||
_err=$(wget "$1" -O "$2" 2>&1)
|
||||
_status=$?
|
||||
else
|
||||
get_ciphersuites_for_wget
|
||||
_ciphersuites="$RETVAL"
|
||||
if [ -n "$_ciphersuites" ]; then
|
||||
_err=$(wget --https-only --secure-protocol=TLSv1_2 --ciphers "$_ciphersuites" "$1" -O "$2" 2>&1)
|
||||
_status=$?
|
||||
else
|
||||
echo "Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure"
|
||||
if ! check_help_for "$3" wget --https-only --secure-protocol; then
|
||||
echo "Warning: Not enforcing TLS v1.2, this is potentially less secure"
|
||||
_err=$(wget "$1" -O "$2" 2>&1)
|
||||
_status=$?
|
||||
else
|
||||
_err=$(wget --https-only --secure-protocol=TLSv1_2 "$1" -O "$2" 2>&1)
|
||||
_status=$?
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ -n "$_err" ]; then
|
||||
echo "$_err" >&2
|
||||
if echo "$_err" | grep -q ' 404 Not Found$'; then
|
||||
err "installer for platform '$3' not found, this may be unsupported"
|
||||
fi
|
||||
fi
|
||||
return $_status
|
||||
else
|
||||
err "Unknown downloader" # should not reach here
|
||||
fi
|
||||
}
|
||||
|
||||
check_help_for() {
|
||||
local _arch
|
||||
local _cmd
|
||||
local _arg
|
||||
_arch="$1"
|
||||
shift
|
||||
_cmd="$1"
|
||||
shift
|
||||
|
||||
local _category
|
||||
if "$_cmd" --help | grep -q 'For all options use the manual or "--help all".'; then
|
||||
_category="all"
|
||||
else
|
||||
_category=""
|
||||
fi
|
||||
|
||||
case "$_arch" in
|
||||
|
||||
*darwin*)
|
||||
if check_cmd sw_vers; then
|
||||
case $(sw_vers -productVersion) in
|
||||
10.*)
|
||||
# If we're running on macOS, older than 10.13, then we always
|
||||
# fail to find these options to force fallback
|
||||
if [ "$(sw_vers -productVersion | cut -d. -f2)" -lt 13 ]; then
|
||||
# Older than 10.13
|
||||
echo "Warning: Detected macOS platform older than 10.13"
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
11.*)
|
||||
# We assume Big Sur will be OK for now
|
||||
;;
|
||||
*)
|
||||
# Unknown product version, warn and continue
|
||||
echo "Warning: Detected unknown macOS major version: $(sw_vers -productVersion)"
|
||||
echo "Warning TLS capabilities detection may fail"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
for _arg in "$@"; do
|
||||
if ! "$_cmd" --help "$_category" | grep -q -- "$_arg"; then
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
true # not strictly needed
|
||||
}
|
||||
|
||||
# Check if curl supports the --retry flag, then pass it to the curl invocation.
|
||||
check_curl_for_retry_support() {
|
||||
local _retry_supported=""
|
||||
# "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc.
|
||||
if check_help_for "notspecified" "curl" "--retry"; then
|
||||
_retry_supported="--retry 3"
|
||||
if check_help_for "notspecified" "curl" "--continue-at"; then
|
||||
# "-C -" tells curl to automatically find where to resume the download when retrying.
|
||||
_retry_supported="--retry 3 -C -"
|
||||
fi
|
||||
fi
|
||||
|
||||
RETVAL="$_retry_supported"
|
||||
}
|
||||
|
||||
# Return cipher suite string specified by user, otherwise return strong TLS 1.2-1.3 cipher suites
|
||||
# if support by local tools is detected. Detection currently supports these curl backends:
|
||||
# GnuTLS and OpenSSL (possibly also LibreSSL and BoringSSL). Return value can be empty.
|
||||
get_ciphersuites_for_curl() {
|
||||
if [ -n "${RUSTUP_TLS_CIPHERSUITES-}" ]; then
|
||||
# user specified custom cipher suites, assume they know what they're doing
|
||||
RETVAL="$RUSTUP_TLS_CIPHERSUITES"
|
||||
return
|
||||
fi
|
||||
|
||||
local _openssl_syntax="no"
|
||||
local _gnutls_syntax="no"
|
||||
local _backend_supported="yes"
|
||||
if curl -V | grep -q ' OpenSSL/'; then
|
||||
_openssl_syntax="yes"
|
||||
elif curl -V | grep -iq ' LibreSSL/'; then
|
||||
_openssl_syntax="yes"
|
||||
elif curl -V | grep -iq ' BoringSSL/'; then
|
||||
_openssl_syntax="yes"
|
||||
elif curl -V | grep -iq ' GnuTLS/'; then
|
||||
_gnutls_syntax="yes"
|
||||
else
|
||||
_backend_supported="no"
|
||||
fi
|
||||
|
||||
local _args_supported="no"
|
||||
if [ "$_backend_supported" = "yes" ]; then
|
||||
# "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc.
|
||||
if check_help_for "notspecified" "curl" "--tlsv1.2" "--ciphers" "--proto"; then
|
||||
_args_supported="yes"
|
||||
fi
|
||||
fi
|
||||
|
||||
local _cs=""
|
||||
if [ "$_args_supported" = "yes" ]; then
|
||||
if [ "$_openssl_syntax" = "yes" ]; then
|
||||
_cs=$(get_strong_ciphersuites_for "openssl")
|
||||
elif [ "$_gnutls_syntax" = "yes" ]; then
|
||||
_cs=$(get_strong_ciphersuites_for "gnutls")
|
||||
fi
|
||||
fi
|
||||
|
||||
RETVAL="$_cs"
|
||||
}
|
||||
|
||||
# Return cipher suite string specified by user, otherwise return strong TLS 1.2-1.3 cipher suites
|
||||
# if support by local tools is detected. Detection currently supports these wget backends:
|
||||
# GnuTLS and OpenSSL (possibly also LibreSSL and BoringSSL). Return value can be empty.
|
||||
get_ciphersuites_for_wget() {
|
||||
if [ -n "${RUSTUP_TLS_CIPHERSUITES-}" ]; then
|
||||
# user specified custom cipher suites, assume they know what they're doing
|
||||
RETVAL="$RUSTUP_TLS_CIPHERSUITES"
|
||||
return
|
||||
fi
|
||||
|
||||
local _cs=""
|
||||
if wget -V | grep -q '\-DHAVE_LIBSSL'; then
|
||||
# "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc.
|
||||
if check_help_for "notspecified" "wget" "TLSv1_2" "--ciphers" "--https-only" "--secure-protocol"; then
|
||||
_cs=$(get_strong_ciphersuites_for "openssl")
|
||||
fi
|
||||
elif wget -V | grep -q '\-DHAVE_LIBGNUTLS'; then
|
||||
# "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc.
|
||||
if check_help_for "notspecified" "wget" "TLSv1_2" "--ciphers" "--https-only" "--secure-protocol"; then
|
||||
_cs=$(get_strong_ciphersuites_for "gnutls")
|
||||
fi
|
||||
fi
|
||||
|
||||
RETVAL="$_cs"
|
||||
}
|
||||
|
||||
# Return strong TLS 1.2-1.3 cipher suites in OpenSSL or GnuTLS syntax. TLS 1.2
|
||||
# excludes non-ECDHE and non-AEAD cipher suites. DHE is excluded due to bad
|
||||
# DH params often found on servers (see RFC 7919). Sequence matches or is
|
||||
# similar to Firefox 68 ESR with weak cipher suites disabled via about:config.
|
||||
# $1 must be openssl or gnutls.
|
||||
get_strong_ciphersuites_for() {
|
||||
if [ "$1" = "openssl" ]; then
|
||||
# OpenSSL is forgiving of unknown values, no problems with TLS 1.3 values on versions that don't support it yet.
|
||||
echo "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384"
|
||||
elif [ "$1" = "gnutls" ]; then
|
||||
# GnuTLS isn't forgiving of unknown values, so this may require a GnuTLS version that supports TLS 1.3 even if wget doesn't.
|
||||
# Begin with SECURE128 (and higher) then remove/add to build cipher suites. Produces same 9 cipher suites as OpenSSL but in slightly different order.
|
||||
echo "SECURE128:-VERS-SSL3.0:-VERS-TLS1.0:-VERS-TLS1.1:-VERS-DTLS-ALL:-CIPHER-ALL:-MAC-ALL:-KX-ALL:+AEAD:+ECDHE-ECDSA:+ECDHE-RSA:+AES-128-GCM:+CHACHA20-POLY1305:+AES-256-GCM"
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@" || exit 1
|
36
README.md
36
README.md
@ -1,6 +1,6 @@
|
||||
# jupyter-image-stacks
|
||||
|
||||
## Jupyter For Data-Science
|
||||
## Universal Jupyterlab Image stacks
|
||||
|
||||
English | [中文](README_CN.md)
|
||||
|
||||
@ -77,19 +77,27 @@ c.DockerSpawner.allowed_images = {
|
||||
### Image dependencies
|
||||
```mermaid
|
||||
graph LR
|
||||
Python-->PROGRAM{PROGRAMLANG}
|
||||
PROGRAM-->PB(R)
|
||||
PROGRAM-->PC(Julia)
|
||||
Python-->PRA(Scipy)-->PRAA(pyai)
|
||||
Python-->PRB(Scrpy)
|
||||
Python-->PRC(pyspark)
|
||||
Python-->PRD(pyflink)
|
||||
Python-->MATH{MATH-TOOL}-->MA(Octave)
|
||||
MATH-->MB(Maple)
|
||||
MATH-->MC(Sagemath)
|
||||
MATH-->MD(MATLAB)-->MDA(minimal)-->MDAA(mcm)
|
||||
MATH-->ME(Mathematica)
|
||||
MATH-->MF(Scilab)
|
||||
Python-->P{PROGRAMLANG}
|
||||
P-->PA(R)
|
||||
P-->PB(Julia)
|
||||
P-->PC(C)
|
||||
P-->PD(Cpp)
|
||||
|
||||
Python-->G{GUI}-->GA(Novnc)-->GAA(Pyqt6)
|
||||
|
||||
Python-->S{Science-compute}-->SA(Scipy)
|
||||
S-->SB(Pyai)
|
||||
|
||||
Python-->B{BigData}-->BA(pyspark)
|
||||
B-->BB(pyflink)
|
||||
B-->BC(Scrpy)
|
||||
|
||||
Python-->M{MATH-TOOL}-->MA(Octave)
|
||||
M-->MB(Maple)
|
||||
M-->MC(Sagemath)
|
||||
M-->MD(MATLAB-minimal)-->MDA(Matlab-mcm)
|
||||
M-->ME(Mathematica)
|
||||
M-->MF(Scilab)
|
||||
```
|
||||
|
||||
## Upstream
|
||||
|
36
README_CN.md
36
README_CN.md
@ -1,6 +1,6 @@
|
||||
# jupyter-image-stacks
|
||||
|
||||
## Jupyter 项目为了数据科学
|
||||
## 通用的Jupyterlab镜像组
|
||||
|
||||
English | [中文](README_CN.md)
|
||||
|
||||
@ -85,19 +85,27 @@ plt.rcParams["font.family"] = zh_font.get_name()
|
||||
### 镜像依赖关系
|
||||
```mermaid
|
||||
graph LR
|
||||
Python-->PROGRAM{PROGRAMLANG}
|
||||
PROGRAM-->PB(R)
|
||||
PROGRAM-->PC(Julia)
|
||||
Python-->PRA(Scipy)-->PRAA(pyai)
|
||||
Python-->PRB(Scrpy)
|
||||
Python-->PRC(pyspark)
|
||||
Python-->PRD(pyflink)
|
||||
Python-->MATH{MATH-TOOL}-->MA(Octave)
|
||||
MATH-->MB(Maple)
|
||||
MATH-->MC(Sagemath)
|
||||
MATH-->MD(MATLAB)-->MDA(minimal)-->MDAA(mcm)
|
||||
MATH-->ME(Mathematica)
|
||||
MATH-->MF(Scilab)
|
||||
Python-->P{PROGRAMLANG}
|
||||
P-->PA(R)
|
||||
P-->PB(Julia)
|
||||
P-->PC(C)
|
||||
P-->PD(Cpp)
|
||||
|
||||
Python-->G{GUI}-->GA(Novnc)-->GAA(Pyqt6)
|
||||
|
||||
Python-->S{Science-compute}-->SA(Scipy)
|
||||
S-->SB(Pyai)
|
||||
|
||||
Python-->B{BigData}-->BA(pyspark)
|
||||
B-->BB(pyflink)
|
||||
B-->BC(Scrpy)
|
||||
|
||||
Python-->M{MATH-TOOL}-->MA(Octave)
|
||||
M-->MB(Maple)
|
||||
M-->MC(Sagemath)
|
||||
M-->MD(MATLAB-minimal)-->MDA(Matlab-mcm)
|
||||
M-->ME(Mathematica)
|
||||
M-->MF(Scilab)
|
||||
```
|
||||
|
||||
## 上游
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:scipy-c
|
||||
FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
|
||||
# install torch
|
||||
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu && \
|
@ -4,8 +4,6 @@ FROM eoelab.org:1027/ben0i0d/jupyter:py-c
|
||||
RUN pip install \
|
||||
# Data analysis and visualization
|
||||
'matplotlib' \
|
||||
# Machine learning and data mining
|
||||
'duckdb' \
|
||||
# Scientific calculations and statistical analysis
|
||||
'numpy' &&\
|
||||
pip cache purge && \
|
Loading…
x
Reference in New Issue
Block a user