forked from eoeair/cenv
merge DENV, RENV, GPU into this REPO(SIMPLIFY)
This commit is contained in:
commit
81137abc0e
241
.gitea/workflows/Flow.yaml
Normal file
241
.gitea/workflows/Flow.yaml
Normal file
@ -0,0 +1,241 @@
|
||||
name: Flow
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Base:
|
||||
runs-on: runner
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: base build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: base/cpu
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:base
|
||||
|
||||
CUDA_Base:
|
||||
runs-on: runner
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: CUDA_Base build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: base/cuda/base
|
||||
build-args: |
|
||||
DEBIAN_MIRROR=mirrors.ustc.edu.cn
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:cuda_base
|
||||
|
||||
CUDA_Runtime:
|
||||
runs-on: runner
|
||||
needs: CUDA_Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: CUDA_Runtime build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: base/cuda/runtime
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:cuda_runtime
|
||||
|
||||
CUDA_Devel:
|
||||
runs-on: runner
|
||||
needs: CUDA_Runtime
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: CUDA_Devel build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: base/cuda/devel
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:cuda_devel
|
||||
|
||||
ROCM:
|
||||
runs-on: runner
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: ROCM build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: base/rocm
|
||||
build-args: |
|
||||
UBUNTU_MIRROR=mirrors.ustc.edu.cn
|
||||
http_proxy=http://192.168.2.2:7890
|
||||
https_proxy=http://192.168.2.2:7890
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:rocm
|
||||
|
||||
Cpp:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: cpp build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Program/cpp
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:cpp
|
||||
|
||||
JDK:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: java build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Program/java/jdk
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:java
|
||||
|
||||
JRE:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: jre build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Program/java/jre
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:jre
|
||||
|
||||
|
||||
Javascipt:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: js build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Program/js
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:js
|
||||
|
||||
Python:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: python build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: Program/python
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:python
|
||||
|
||||
Julia:
|
||||
runs-on: runner
|
||||
needs: Python
|
||||
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
|
||||
|
||||
|
||||
MC_JRE_8:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: mc_jre_8 build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: GS/mc/jre/8
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:mc_jre_8
|
||||
|
||||
MC_JRE_11:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: mc_jre_11 build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: GS/mc/jre/11
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:mc_jre_11
|
||||
|
||||
MC_JRE_17:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: mc_jre_17 build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: GS/mc/jre/17
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:mc_jre_17
|
||||
|
||||
MC_JRE_21:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: mc_jre_21 build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: GS/mc/jre/21
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:mc_jre_21
|
||||
|
||||
Steam:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: steam build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: steam
|
||||
build-args: |
|
||||
http_proxy=http://192.168.2.2:7890
|
||||
https_proxy=http://192.168.2.2:7890
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:steam
|
||||
|
||||
Steam_Wine:
|
||||
runs-on: runner
|
||||
needs: Base
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: https://eoelab.org:1027/actions/checkout@v4
|
||||
- name: steam_wine build
|
||||
uses: https://eoelab.org:1027/actions/build-push-action@v6
|
||||
with:
|
||||
context: steam/steam_wine
|
||||
tags: eoelab.org:1027/${{ gitea.repository }}:steam_wine
|
||||
|
||||
Push:
|
||||
runs-on: runner
|
||||
needs: [Steam_Wine]
|
||||
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
|
0
GS/mc/be/be_here
Normal file
0
GS/mc/be/be_here
Normal file
17
GS/mc/jre/11/Dockerfile
Normal file
17
GS/mc/jre/11/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base AS builder
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update --yes && apt-get install --yes gnupg curl && \
|
||||
curl -s https://repos.azul.com/azul-repo.key | gpg --dearmor -o /usr/share/keyrings/azul.gpg && \
|
||||
echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" | tee /etc/apt/sources.list.d/zulu.list && \
|
||||
apt-get update --yes && apt-get install --yes --no-install-recommends zulu11-ca-jre-headless
|
||||
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base
|
||||
|
||||
USER root
|
||||
|
||||
COPY --from=builder /usr/lib/jvm/zulu11/ /usr/lib/jvm/zulu11/
|
||||
|
||||
RUN ln -s /usr/lib/jvm/zulu11/bin/java /usr/bin/java
|
||||
|
17
GS/mc/jre/17/Dockerfile
Normal file
17
GS/mc/jre/17/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base AS builder
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update --yes && apt-get install --yes gnupg curl && \
|
||||
curl -s https://repos.azul.com/azul-repo.key | gpg --dearmor -o /usr/share/keyrings/azul.gpg && \
|
||||
echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" | tee /etc/apt/sources.list.d/zulu.list && \
|
||||
apt-get update --yes && apt-get install --yes --no-install-recommends zulu17-ca-jre-headless
|
||||
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base
|
||||
|
||||
USER root
|
||||
|
||||
COPY --from=builder /usr/lib/jvm/zulu17/ /usr/lib/jvm/zulu17/
|
||||
|
||||
RUN ln -s /usr/lib/jvm/zulu17/bin/java /usr/bin/java
|
||||
|
17
GS/mc/jre/21/Dockerfile
Normal file
17
GS/mc/jre/21/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base AS builder
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update --yes && apt-get install --yes gnupg curl && \
|
||||
curl -s https://repos.azul.com/azul-repo.key | gpg --dearmor -o /usr/share/keyrings/azul.gpg && \
|
||||
echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" | tee /etc/apt/sources.list.d/zulu.list && \
|
||||
apt-get update --yes && apt-get install --yes --no-install-recommends zulu21-ca-jre-headless
|
||||
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base
|
||||
|
||||
USER root
|
||||
|
||||
COPY --from=builder /usr/lib/jvm/zulu21/ /usr/lib/jvm/zulu21/
|
||||
|
||||
RUN ln -s /usr/lib/jvm/zulu21/bin/java /usr/bin/java
|
||||
|
17
GS/mc/jre/8/Dockerfile
Normal file
17
GS/mc/jre/8/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base AS builder
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update --yes && apt-get install --yes gnupg curl && \
|
||||
curl -s https://repos.azul.com/azul-repo.key | gpg --dearmor -o /usr/share/keyrings/azul.gpg && \
|
||||
echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" | tee /etc/apt/sources.list.d/zulu.list && \
|
||||
apt-get update --yes && apt-get install --yes --no-install-recommends zulu8-ca-jre-headless
|
||||
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base
|
||||
|
||||
USER root
|
||||
|
||||
COPY --from=builder /usr/lib/jvm/zulu8/ /usr/lib/jvm/zulu8/
|
||||
|
||||
RUN ln -s /usr/lib/jvm/zulu8/bin/java /usr/bin/java
|
||||
|
36
GS/mcsm/daemon/jre/Dockerfile
Normal file
36
GS/mcsm/daemon/jre/Dockerfile
Normal file
@ -0,0 +1,36 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base AS builder
|
||||
|
||||
USER root
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
# Download Java
|
||||
# Download Node.js
|
||||
# Download MCSManager
|
||||
# wget https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz
|
||||
RUN apt-get update --yes && apt-get install --yes xz-utils gnupg curl wget && \
|
||||
curl -s https://repos.azul.com/azul-repo.key | gpg --dearmor -o /usr/share/keyrings/azul.gpg && \
|
||||
echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" | tee /etc/apt/sources.list.d/zulu.list && \
|
||||
apt-get update --yes && apt-get install --yes --no-install-recommends zulu17-ca-jre-headless && \
|
||||
wget https://nodejs.org/dist/v20.11.0/node-v20.11.0-linux-x64.tar.xz && \
|
||||
tar -xvf node-v20.11.0-linux-x64.tar.xz && rm node-v20.11.0-linux-x64.tar.xz && \
|
||||
cd mcsm && tar -zxf mcsmanager_linux_release.tar.gz && rm mcsmanager_linux_release.tar.gz
|
||||
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base
|
||||
|
||||
EXPOSE 24444
|
||||
|
||||
USER root
|
||||
|
||||
COPY --from=builder /opt/ /opt/
|
||||
COPY --from=builder /usr/lib/jvm/ /usr/lib/jvm/
|
||||
|
||||
RUN apt-get update --yes && apt-get install --yes --no-install-recommends zip unzip && apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
# Add Node.js to system PATH
|
||||
ln -s /opt/node-v20.11.0-linux-x64/bin/node /usr/bin/node && ln -s /opt/node-v20.11.0-linux-x64/bin/npm /usr/bin/npm && \
|
||||
ln -s /usr/lib/jvm/zulu17/bin/java /usr/bin/java && \
|
||||
cd /opt/mcsm/daemon && npm i --production --registry=https://registry.npmmirror.com
|
||||
|
||||
WORKDIR /opt/mcsm/daemon
|
||||
|
||||
CMD node app.js
|
34
GS/mcsm/daemon/steam/Dockerfile
Normal file
34
GS/mcsm/daemon/steam/Dockerfile
Normal file
@ -0,0 +1,34 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base AS builder
|
||||
|
||||
USER root
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
COPY mcsmanager_linux_release.tar.gz /opt/mcsm/
|
||||
# Download Node.js
|
||||
# Download MCSManager
|
||||
# wget https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz
|
||||
RUN apt-get update --yes && apt-get install --yes wget xz-utils && apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
wget https://nodejs.org/dist/v20.11.0/node-v20.11.0-linux-x64.tar.xz && \
|
||||
tar -xvf node-v20.11.0-linux-x64.tar.xz && rm node-v20.11.0-linux-x64.tar.xz && \
|
||||
cd mcsm && tar -zxf mcsmanager_linux_release.tar.gz && rm mcsmanager_linux_release.tar.gz
|
||||
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base
|
||||
|
||||
EXPOSE 24445
|
||||
|
||||
COPY --from=builder /opt/ /opt/
|
||||
|
||||
RUN sed -i 's/main/main contrib non-free non-free-firmware/g' /etc/apt/sources.list.d/debian.sources && \
|
||||
echo steam steam/question select "I AGREE" | debconf-set-selections && \
|
||||
echo steam steam/license note '' | debconf-set-selections && \
|
||||
dpkg --add-architecture i386 &&\
|
||||
apt-get update --yes && apt-get install --yes --no-install-recommends steamcmd &&\
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
ln -s /usr/games/steamcmd /usr/bin/steamcmd && \
|
||||
ln -s /opt/node-v20.11.0-linux-x64/bin/node /usr/bin/node && ln -s /opt/node-v20.11.0-linux-x64/bin/npm /usr/bin/npm && \
|
||||
cd /opt/mcsm/daemon && npm i --production --registry=https://registry.npmmirror.com
|
||||
|
||||
WORKDIR /opt/mcsm/daemon
|
||||
|
||||
CMD node app.js
|
30
GS/mcsm/web/Dockerfile
Normal file
30
GS/mcsm/web/Dockerfile
Normal file
@ -0,0 +1,30 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base AS builder
|
||||
|
||||
USER root
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
COPY mcsmanager_linux_release.tar.gz /opt/mcsm/
|
||||
# Download Node.js
|
||||
# Download MCSManager
|
||||
# wget https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz
|
||||
RUN apt-get update --yes && apt-get install --yes wget xz-utils && apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
wget https://nodejs.org/dist/v20.11.0/node-v20.11.0-linux-x64.tar.xz && \
|
||||
tar -xvf node-v20.11.0-linux-x64.tar.xz && rm node-v20.11.0-linux-x64.tar.xz && \
|
||||
cd mcsm && tar -zxf mcsmanager_linux_release.tar.gz && rm mcsmanager_linux_release.tar.gz
|
||||
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base
|
||||
|
||||
EXPOSE 23333
|
||||
|
||||
USER root
|
||||
|
||||
COPY --from=builder /opt/ /opt/
|
||||
|
||||
# Add Node.js to system PATH
|
||||
RUN ln -s /opt/node-v20.11.0-linux-x64/bin/node /usr/bin/node && ln -s /opt/node-v20.11.0-linux-x64/bin/npm /usr/bin/npm && \
|
||||
cd /opt/mcsm/web && npm i --production --registry=https://registry.npmmirror.com
|
||||
|
||||
WORKDIR /opt/mcsm/web
|
||||
|
||||
CMD node app.js
|
10
GS/steam/Dockerfile
Normal file
10
GS/steam/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base
|
||||
|
||||
RUN sed -i 's/main/main contrib non-free non-free-firmware/g' /etc/apt/sources.list.d/debian.sources && \
|
||||
echo steam steam/question select "I AGREE" | debconf-set-selections && \
|
||||
echo steam steam/license note '' | debconf-set-selections && \
|
||||
dpkg --add-architecture i386 && \
|
||||
apt-get update --yes && apt-get install --yes steamcmd ca-certificates && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
ln -s /usr/games/steamcmd /usr/bin/steamcmd && \
|
||||
steamcmd +login anonymous +quit
|
4
GS/steam/steam_wine/Dockerfile
Normal file
4
GS/steam/steam_wine/Dockerfile
Normal file
@ -0,0 +1,4 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:steam
|
||||
|
||||
RUN apt-get update --yes && apt-get install --yes --no-install-recommends wine && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
19
Program/cpp/.devcontainer/devcontainer.json
Normal file
19
Program/cpp/.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,19 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
|
||||
{
|
||||
"name": "cpp",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"image": "docker.io/ben0i0d/denv:cpp"
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Configure tool-specific properties.
|
||||
// "customizations": {},
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
7
Program/cpp/Dockerfile
Normal file
7
Program/cpp/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update --yes && apt-get install --yes --no-install-recommends g++ gdb cmake && apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR "${HOME}"
|
19
Program/java/jdk/.devcontainer/devcontainer.json
Normal file
19
Program/java/jdk/.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,19 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
|
||||
{
|
||||
"name": "java",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"image": "docker.io/ben0i0d/denv:java"
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Configure tool-specific properties.
|
||||
// "customizations": {},
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
7
Program/java/jdk/Dockerfile
Normal file
7
Program/java/jdk/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update --yes && apt-get install --yes --no-install-recommends default-jdk-headless && apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR "${HOME}"
|
5
Program/java/jre/Dockerfile
Normal file
5
Program/java/jre/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update --yes && apt-get install --yes --no-install-recommends default-jre-headless && apt-get clean && rm -rf /var/lib/apt/lists/*
|
19
Program/js/.devcontainer/devcontainer.json
Normal file
19
Program/js/.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,19 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
|
||||
{
|
||||
"name": "JS",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"image": "docker.io/ben0i0d/denv:js"
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Configure tool-specific properties.
|
||||
// "customizations": {},
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
3
Program/js/Dockerfile
Normal file
3
Program/js/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base
|
||||
|
||||
RUN apt-get update --yes && apt-get install --yes --no-install-recommends nodejs npm && apt-get clean && rm -rf /var/lib/apt/lists/*
|
19
Program/julia/.devcontainer/devcontainer.json
Normal file
19
Program/julia/.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,19 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
|
||||
{
|
||||
"name": "julia",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"image": "docker.io/ben0i0d/denv:julia"
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Configure tool-specific properties.
|
||||
// "customizations": {},
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
14
Program/julia/Dockerfile
Normal file
14
Program/julia/Dockerfile
Normal file
@ -0,0 +1,14 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:python AS builder
|
||||
|
||||
# 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/cenv:base
|
||||
|
||||
COPY --from=builder /opt/julias/ /opt/julias/
|
||||
|
||||
ENV JULIA_PKG_SERVER=https://mirrors.ustc.edu.cn/julia \
|
||||
JULIA_NUM_THREADS=8
|
||||
|
||||
RUN ln -s "`find /opt/julias -name 'bin'`/julia" /usr/local/bin/julia
|
19
Program/python/.devcontainer/devcontainer.json
Normal file
19
Program/python/.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,19 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
|
||||
{
|
||||
"name": "python",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"image": "docker.io/ben0i0d/denv:python"
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Configure tool-specific properties.
|
||||
// "customizations": {},
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
12
Program/python/Dockerfile
Normal file
12
Program/python/Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base
|
||||
|
||||
USER root
|
||||
|
||||
ENV PATH="/opt/base/bin:${PATH}"
|
||||
|
||||
# install python
|
||||
RUN apt-get update --yes && apt-get install --yes --no-install-recommends python3-venv && apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
python3 -m venv /opt/base && \
|
||||
echo '[global]\nindex-url = https://mirrors.bfsu.edu.cn/pypi/web/simple' > /etc/pip.conf
|
||||
|
||||
WORKDIR "${HOME}"
|
19
Program/r/.devcontainer/devcontainer.json
Normal file
19
Program/r/.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,19 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
|
||||
{
|
||||
"name": "r",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"image": "docker.io/ben0i0d/denv:r"
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Configure tool-specific properties.
|
||||
// "customizations": {},
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
8
Program/r/Dockerfile
Normal file
8
Program/r/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:base
|
||||
|
||||
USER root
|
||||
|
||||
# INSTALL R+IRkernel
|
||||
RUN apt-get update && apt-get install --yes --no-install-recommends r-base&& apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
# set cran mirror
|
||||
echo 'options(repos=c(USTC="https://mirrors.ustc.edu.cn/CRAN/"))' >> /usr/lib/R/library/base/R/Rprofile
|
65
README.md
Normal file
65
README.md
Normal file
@ -0,0 +1,65 @@
|
||||
# Cenv
|
||||
English | [中文](README_CN.md)
|
||||
|
||||
**THIS doc for non-CN USER**
|
||||
|
||||
**dockerhub: https://hub.docker.com/r/ben0i0d/cenv**
|
||||
|
||||
**Our Gitea: https://eoelab.org:1027/ben0i0d/cenv**
|
||||
|
||||
## Prerequisites
|
||||
* CPU : nothing to do
|
||||
* ROCM : amdgpu-dkms -> Docker containers share the kernel with the host OS. Therefore, the ROCm kernel-mode driver (amdgpu-dkms) must be installed on the host.
|
||||
* CUDA : nvidia-container-toolkit/nvidia-docker2
|
||||
|
||||
## Platform
|
||||
* OS : debian 12 / ubuntu 24.04(ROCM only)
|
||||
* ARCH : x86_64
|
||||
|
||||
## Version
|
||||
* cuda: 12.4
|
||||
* rocm: 6.2.4
|
||||
|
||||
## Usage
|
||||
### container
|
||||
* CPU just `docker run -it`
|
||||
* ROCM `docker run --device /dev/kfd --device /dev/dri --security-opt seccomp=unconfined IMAGE`
|
||||
### devcontainer(VScode)
|
||||
`cp -r .devcontainer WORKSDIR`
|
||||
|
||||
## Image dependencies
|
||||
```mermaid
|
||||
graph LR
|
||||
|
||||
CPU-->B{Base}
|
||||
CUDA-->B
|
||||
ROCM-->B
|
||||
|
||||
B-->P{PROGRAM}
|
||||
P-->PA(Cpp)
|
||||
P-->PB(Java)
|
||||
PB-->PBA(Jdk)
|
||||
PB-->PBB(Jre)
|
||||
P-->PC(Js)
|
||||
P-->PD(Julia)
|
||||
P-->PE(Python)
|
||||
P-->PF(R)
|
||||
|
||||
B-->G{GameServer}-->GA{MC}-->GAA(JAVA)
|
||||
GAA-->GAAA(JRE_8)
|
||||
GAA-->GAAB(JRE_11)
|
||||
GAA-->GAAC(JRE_17)
|
||||
GAA-->GAAD(JRE_21)
|
||||
|
||||
G-->GB{MCSM}-->GBA(Web)
|
||||
GB-->GBB(Daemon)
|
||||
|
||||
G-->GC(steam)-->GCA(steam_wine)
|
||||
```
|
||||
## Upstream
|
||||
* NVIDIA: https://gitlab.com/nvidia/container-images/cuda
|
||||
* ROCM: https://github.com/ROCm/ROCm-docker
|
||||
|
||||
## Mirror source
|
||||
* debian ustc:https://mirrors.ustc.edu.cn/help/debian.html
|
||||
* ubuntu ustc:https://mirrors.ustc.edu.cn/help/ubuntu.html
|
66
README_CN.md
Normal file
66
README_CN.md
Normal file
@ -0,0 +1,66 @@
|
||||
# gpu
|
||||
English | [中文](README_CN.md)
|
||||
|
||||
**为中国用户的文档**
|
||||
|
||||
**dockerhub: https://hub.docker.com/r/ben0i0d/gpu**
|
||||
|
||||
**Gitea: https://eoelab.org:1027/ben0i0d/gpu**
|
||||
|
||||
## 先决条件
|
||||
* CPU : nothing to do
|
||||
* ROCM : amdgpu-dkms -> Docker 容器与主机操作系统共享内核。因此,主机上必须安装 ROCm 内核模式驱动程序 ( amdgpu-dkms )
|
||||
* CUDA : nvidia-container-toolkit/nvidia-docker2
|
||||
|
||||
## 目标平台
|
||||
* OS : debian 12 / ubuntu 24.04(只有ROCM)
|
||||
* ARCH : x86_64
|
||||
|
||||
## 版本
|
||||
* cuda: 12.4
|
||||
* rocm: 6.2.4
|
||||
|
||||
## 使用方法
|
||||
### container
|
||||
* CPU just `docker run -it`
|
||||
* ROCM `docker run --device /dev/kfd --device /dev/dri --security-opt seccomp=unconfined IMAGE`
|
||||
### devcontainer(VScode)
|
||||
`cp -r .devcontainer WORKSDIR`
|
||||
|
||||
## 镜像依赖
|
||||
```mermaid
|
||||
graph LR
|
||||
|
||||
CPU-->B{Base}
|
||||
CUDA-->B
|
||||
ROCM-->B
|
||||
|
||||
B-->P{PROGRAM}
|
||||
P-->PA(Cpp)
|
||||
P-->PB(Java)
|
||||
PB-->PBA(Jdk)
|
||||
PB-->PBB(Jre)
|
||||
P-->PC(Js)
|
||||
P-->PD(Julia)
|
||||
P-->PE(Python)
|
||||
P-->PF(R)
|
||||
|
||||
B-->G{GameServer}-->GA{MC}-->GAA(JAVA)
|
||||
GAA-->GAAA(JRE_8)
|
||||
GAA-->GAAB(JRE_11)
|
||||
GAA-->GAAC(JRE_17)
|
||||
GAA-->GAAD(JRE_21)
|
||||
|
||||
G-->GB{MCSM}-->GBA(Web)
|
||||
GB-->GBB(Daemon)
|
||||
|
||||
G-->GC(steam)-->GCA(steam_wine)
|
||||
```
|
||||
|
||||
## 镜像源
|
||||
* debian ustc:https://mirrors.ustc.edu.cn/help/debian.html
|
||||
* ubuntu ustc:https://mirrors.ustc.edu.cn/help/ubuntu.html
|
||||
|
||||
## 上游
|
||||
* NVIDIA: https://gitlab.com/nvidia/container-images/cuda
|
||||
* ROCM: https://github.com/ROCm/ROCm-docker
|
19
base/cpu/.devcontainer/devcontainer.json
Normal file
19
base/cpu/.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,19 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
|
||||
{
|
||||
"name": "base",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"image": "docker.io/ben0i0d/denv:base"
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Configure tool-specific properties.
|
||||
// "customizations": {},
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
8
base/cpu/Dockerfile
Normal file
8
base/cpu/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
USER root
|
||||
|
||||
# Configure environment
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources
|
27
base/cuda/base/Dockerfile
Normal file
27
base/cuda/base/Dockerfile
Normal file
@ -0,0 +1,27 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
ARG DEBIAN_MIRROR
|
||||
|
||||
ARG NV_CUDA_CUDART_VERSION=12.4.127-1 \
|
||||
NV_CUDA_COMPAT_PACKAGE=cuda-compat-12-4 \
|
||||
NVARCH=x86_64
|
||||
|
||||
# nvidia-container-runtime
|
||||
ENV NVIDIA_VISIBLE_DEVICES=all \
|
||||
NVIDIA_DRIVER_CAPABILITIES=compute,utility \
|
||||
PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH} \
|
||||
LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH}
|
||||
|
||||
RUN sed -i "s/deb.debian.org/${DEBIAN_MIRROR}/g" /etc/apt/sources.list.d/debian.sources && \
|
||||
apt-get update && apt-get install -y --no-install-recommends gnupg2 curl ca-certificates && \
|
||||
curl -fsSLO https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/${NVARCH}/cuda-keyring_1.1-1_all.deb && \
|
||||
dpkg -i cuda-keyring_1.1-1_all.deb && rm cuda-keyring_1.1-1_all.deb &&\
|
||||
# # For libraries in the cuda-compat-* package: https://docs.nvidia.com/cuda/eula/index.html#attachment-a
|
||||
apt-get update && apt-get install -y --no-install-recommends \
|
||||
cuda-cudart-12-4=${NV_CUDA_CUDART_VERSION} \
|
||||
${NV_CUDA_COMPAT_PACKAGE} && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
# Required for nvidia-docker v1
|
||||
echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
|
||||
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
|
||||
|
31
base/cuda/devel/Dockerfile
Normal file
31
base/cuda/devel/Dockerfile
Normal file
@ -0,0 +1,31 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:cuda_runtime
|
||||
|
||||
ARG NV_CUDA_LIB_VERSION=12.4.1-1 \
|
||||
NV_CUDA_CUDART_DEV_VERSION=12.4.127-1 \
|
||||
NV_NVML_DEV_VERSION=12.4.127-1 \
|
||||
NV_LIBCUSPARSE_DEV_VERSION=12.3.1.170-1 \
|
||||
NV_LIBNPP_DEV_PACKAGE="libnpp-dev-12-4=12.2.5.30-1" \
|
||||
NV_LIBCUBLAS_DEV_PACKAGE_NAME=libcublas-dev-12-4 \
|
||||
NV_LIBCUBLAS_DEV_PACKAGE="libcublas-dev-12-4=12.4.5.8-1" \
|
||||
NV_CUDA_NSIGHT_COMPUTE_DEV_PACKAGE="cuda-nsight-compute-12-4=12.4.1-1" \
|
||||
NV_NVPROF_DEV_PACKAGE="cuda-nvprof-12-4=12.4.127-1" \
|
||||
NV_LIBNCCL_DEV_PACKAGE_NAME=libnccl-dev \
|
||||
NV_LIBNCCL_DEV_PACKAGE="libnccl-dev=2.21.5-1+cuda12.4"
|
||||
|
||||
ENV LIBRARY_PATH=/usr/local/cuda/lib64/stubs:$LIBRARY_PATH
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
cuda-cudart-dev-12-4=${NV_CUDA_CUDART_DEV_VERSION} \
|
||||
cuda-command-line-tools-12-4=${NV_CUDA_LIB_VERSION} \
|
||||
cuda-minimal-build-12-4=${NV_CUDA_LIB_VERSION} \
|
||||
cuda-libraries-dev-12-4=${NV_CUDA_LIB_VERSION} \
|
||||
cuda-nvml-dev-12-4=${NV_NVML_DEV_VERSION} \
|
||||
${NV_NVPROF_DEV_PACKAGE} \
|
||||
${NV_LIBNPP_DEV_PACKAGE} \
|
||||
libcusparse-dev-12-4=${NV_LIBCUSPARSE_DEV_VERSION} \
|
||||
${NV_LIBCUBLAS_DEV_PACKAGE} \
|
||||
${NV_LIBNCCL_DEV_PACKAGE} \
|
||||
${NV_CUDA_NSIGHT_COMPUTE_DEV_PACKAGE} &&\
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
# Keep apt from auto upgrading the cublas and nccl packages. See https://gitlab.com/nvidia/container-images/cuda/-/issues/88
|
||||
apt-mark hold ${NV_LIBCUBLAS_DEV_PACKAGE_NAME} ${NV_LIBNCCL_DEV_PACKAGE_NAME}
|
27
base/cuda/runtime/Dockerfile
Normal file
27
base/cuda/runtime/Dockerfile
Normal file
@ -0,0 +1,27 @@
|
||||
FROM eoelab.org:1027/ben0i0d/cenv:cuda_base
|
||||
|
||||
ARG NV_CUDA_LIB_VERSION=12.4.1-1 \
|
||||
NV_NVTX_VERSION=12.4.127-1 \
|
||||
NV_LIBNPP_PACKAGE="libnpp-12-4=12.2.5.30-1" \
|
||||
NV_LIBCUSPARSE_VERSION=12.3.1.170-1 \
|
||||
NV_LIBCUBLAS_PACKAGE_NAME=libcublas-12-4 \
|
||||
NV_LIBCUBLAS_PACKAGE="libcublas-12-4=12.4.5.8-1" \
|
||||
NV_LIBNCCL_PACKAGE_NAME=libnccl2 \
|
||||
NV_LIBNCCL_PACKAGE="libnccl2=2.21.5-1+cuda12.4"
|
||||
|
||||
# Add entrypoint items
|
||||
COPY entrypoint.d/ /opt/nvidia/entrypoint.d/
|
||||
COPY nvidia_entrypoint.sh /opt/nvidia/
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
cuda-libraries-12-4=${NV_CUDA_LIB_VERSION} \
|
||||
${NV_LIBNPP_PACKAGE} \
|
||||
cuda-nvtx-12-4=${NV_NVTX_VERSION} \
|
||||
libcusparse-12-4=${NV_LIBCUSPARSE_VERSION} \
|
||||
${NV_LIBCUBLAS_PACKAGE} \
|
||||
${NV_LIBNCCL_PACKAGE} && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
# Keep apt from auto upgrading the cublas and nccl packages. See https://gitlab.com/nvidia/container-images/cuda/-/issues/88
|
||||
apt-mark hold ${NV_LIBCUBLAS_PACKAGE_NAME} ${NV_LIBNCCL_PACKAGE_NAME}
|
||||
|
||||
ENTRYPOINT ["/opt/nvidia/nvidia_entrypoint.sh"]
|
11
base/cuda/runtime/entrypoint.d/10-banner.sh
Normal file
11
base/cuda/runtime/entrypoint.d/10-banner.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
_banner_file="${BASH_SOURCE[0]/%.sh/.txt}"
|
||||
|
||||
# 10-banner.sh allows itself to be skipped if there exists a
|
||||
# 10-banner.txt, which will be cat'd next alphabetically
|
||||
if [[ ! -f "${_banner_file}" && -n "${NVIDIA_PRODUCT_NAME}" ]]; then
|
||||
echo
|
||||
print_banner_text "=" "${NVIDIA_PRODUCT_NAME}"
|
||||
fi
|
8
base/cuda/runtime/entrypoint.d/12-banner.sh
Normal file
8
base/cuda/runtime/entrypoint.d/12-banner.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
_prodname_uc=$(echo "${NVIDIA_PRODUCT_NAME}" | tr [:lower:] [:upper:] | sed 's/ /_/g' | sed 's/^NVIDIA_//') # Product name
|
||||
_compver="${_prodname_uc}_VERSION" # Upstream component version variable name
|
||||
|
||||
echo
|
||||
[ -n "${!_compver}" ] && echo "${NVIDIA_PRODUCT_NAME} Version ${!_compver}"
|
@ -0,0 +1,2 @@
|
||||
|
||||
Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
6
base/cuda/runtime/entrypoint.d/30-container-license.txt
Normal file
6
base/cuda/runtime/entrypoint.d/30-container-license.txt
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
This container image and its contents are governed by the NVIDIA Deep Learning Container License.
|
||||
By pulling and using the container, you accept the terms and conditions of this license:
|
||||
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
|
||||
|
||||
A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
|
19
base/cuda/runtime/entrypoint.d/50-gpu-driver-check.sh
Normal file
19
base/cuda/runtime/entrypoint.d/50-gpu-driver-check.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2017-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
# Check if libcuda.so.1 -- the CUDA driver -- is present in the ld.so cache or in LD_LIBRARY_PATH
|
||||
_LIBCUDA_FROM_LD_CACHE=$(ldconfig -p | grep libcuda.so.1)
|
||||
_LIBCUDA_FROM_LD_LIBRARY_PATH=$( ( IFS=: ; for i in ${LD_LIBRARY_PATH}; do ls $i/libcuda.so.1 2>/dev/null | grep -v compat; done) )
|
||||
_LIBCUDA_FOUND="${_LIBCUDA_FROM_LD_CACHE}${_LIBCUDA_FROM_LD_LIBRARY_PATH}"
|
||||
|
||||
# Check if /dev/nvidiactl (like on Linux) or /dev/dxg (like on WSL2) or /dev/nvgpu (like on Tegra) is present
|
||||
_DRIVER_FOUND=$(ls /dev/nvidiactl /dev/dxg /dev/nvgpu 2>/dev/null)
|
||||
|
||||
# If either is not true, then GPU functionality won't be usable.
|
||||
if [[ -z "${_LIBCUDA_FOUND}" || -z "${_DRIVER_FOUND}" ]]; then
|
||||
echo
|
||||
echo "WARNING: The NVIDIA Driver was not detected. GPU functionality will not be available."
|
||||
echo " Use the NVIDIA Container Toolkit to start this container with GPU support; see"
|
||||
echo " https://docs.nvidia.com/datacenter/cloud-native/ ."
|
||||
export NVIDIA_CPU_ONLY=1
|
||||
fi
|
12
base/cuda/runtime/entrypoint.d/80-internal-image.sh
Normal file
12
base/cuda/runtime/entrypoint.d/80-internal-image.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
internal_only_deprecation_notice() {
|
||||
echo
|
||||
print_banner_text "*" "PRIVATE IMAGE"
|
||||
echo "This image is PRIVATE."
|
||||
echo "FOR INTERNAL USE ONLY"
|
||||
echo "DO NOT ship to external customers!"
|
||||
}
|
||||
|
||||
[ -n "${NVIDIA_CUDA_INTERNAL}" ] && internal_only_deprecation_notice
|
11
base/cuda/runtime/entrypoint.d/90-deprecated-image.sh
Normal file
11
base/cuda/runtime/entrypoint.d/90-deprecated-image.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
show_deprecation_notice() {
|
||||
echo
|
||||
print_banner_text "*" "DEPRECATION NOTICE!"
|
||||
echo "THIS IMAGE IS DEPRECATED and is scheduled for DELETION."
|
||||
echo " https://gitlab.com/nvidia/container-images/cuda/blob/master/doc/support-policy.md"
|
||||
}
|
||||
|
||||
[ -n "${NVIDIA_CUDA_END_OF_LIFE}" ] && show_deprecation_notice
|
68
base/cuda/runtime/nvidia_entrypoint.sh
Executable file
68
base/cuda/runtime/nvidia_entrypoint.sh
Executable file
@ -0,0 +1,68 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2016-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# Gather parts in alpha order
|
||||
shopt -s nullglob extglob
|
||||
_SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||
declare -a _PARTS=( "${_SCRIPT_DIR}/entrypoint.d"/*@(.txt|.sh) )
|
||||
shopt -u nullglob extglob
|
||||
|
||||
print_repeats() {
|
||||
local -r char="$1" count="$2"
|
||||
local i
|
||||
for ((i=1; i<=$count; i++)); do echo -n "$char"; done
|
||||
echo
|
||||
}
|
||||
|
||||
print_banner_text() {
|
||||
# $1: Banner char
|
||||
# $2: Text
|
||||
local banner_char=$1
|
||||
local -r text="$2"
|
||||
local pad="${banner_char}${banner_char}"
|
||||
print_repeats "${banner_char}" $((${#text} + 6))
|
||||
echo "${pad} ${text} ${pad}"
|
||||
print_repeats "${banner_char}" $((${#text} + 6))
|
||||
}
|
||||
|
||||
# Execute the entrypoint parts
|
||||
for _file in "${_PARTS[@]}"; do
|
||||
case "${_file}" in
|
||||
*.txt) cat "${_file}";;
|
||||
*.sh) source "${_file}";;
|
||||
esac
|
||||
done
|
||||
|
||||
echo
|
||||
|
||||
# This script can either be a wrapper around arbitrary command lines,
|
||||
# or it will simply exec bash if no arguments were given
|
||||
if [[ $# -eq 0 ]]; then
|
||||
exec "/bin/bash"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
19
base/rocm/.devcontainer/devcontainer.json
Normal file
19
base/rocm/.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,19 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
|
||||
{
|
||||
"name": "rocm",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"image": "eoelab.org:1027/ben0i0d/gpu:rocm",
|
||||
"runArgs": ["--device","/dev/kfd", "--device","/dev/dri", "--security-opt", "seccomp=unconfined", "--shm-size","4G"]
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Configure tool-specific properties.
|
||||
// "customizations": {},
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
25
base/rocm/Dockerfile
Normal file
25
base/rocm/Dockerfile
Normal file
@ -0,0 +1,25 @@
|
||||
FROM ubuntu:24.04
|
||||
|
||||
ARG UBUNTU_MIRROR
|
||||
|
||||
ARG VERSION=6.2.4
|
||||
|
||||
ENV PATH="${PATH}:/opt/rocm/bin" \
|
||||
DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# switch to mirror
|
||||
RUN sed -i "s@//.*archive.ubuntu.com@//${UBUNTU_MIRROR}@g" /etc/apt/sources.list.d/ubuntu.sources && \
|
||||
apt-get update && apt-get install -y --no-install-recommends ca-certificates wget gnupg2 && \
|
||||
# add ROCm GPG key
|
||||
mkdir --parents --mode=0755 /etc/apt/keyrings && \
|
||||
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | tee /etc/apt/keyrings/rocm.gpg > /dev/null && \
|
||||
# add ROCm repository
|
||||
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] http://repo.radeon.com/amdgpu/${VERSION}/ubuntu noble main" | tee /etc/apt/sources.list.d/amdgpu.list && \
|
||||
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] http://repo.radeon.com/rocm/apt/${VERSION} noble main" | tee --append /etc/apt/sources.list.d/rocm.list && \
|
||||
echo "Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600" | tee /etc/apt/preferences.d/rocm-pin-600 && \
|
||||
# Install ROCm-ml-libraries
|
||||
apt-get update && apt-get install -y --no-install-recommends rocm-ml-libraries && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
# Configure the system linker by indicating where to find the shared objects
|
||||
echo "/opt/rocm/lib\n/opt/rocm/lib64" > /etc/ld.so.conf.d/rocm.conf
|
||||
|
Loading…
x
Reference in New Issue
Block a user