Compare commits

..

1 Commits
main ... main

Author SHA1 Message Date
pdch
4572633365 add llama-server
更新 Dockerfile,修正工作目录路径并添加健康检查和入口点
2024-12-23 16:10:16 +08:00
40 changed files with 121 additions and 119 deletions

View File

@ -16,7 +16,6 @@ jobs:
CUDA_Base: CUDA_Base:
runs-on: runner runs-on: runner
needs: Base
steps: steps:
- name: checkout code - name: checkout code
uses: https://eoelab.org:1027/actions/checkout@v4 uses: https://eoelab.org:1027/actions/checkout@v4
@ -24,6 +23,8 @@ jobs:
uses: https://eoelab.org:1027/actions/build-push-action@v6 uses: https://eoelab.org:1027/actions/build-push-action@v6
with: with:
context: base/cuda/base context: base/cuda/base
build-args: |
DEBIAN_MIRROR=mirrors.ustc.edu.cn
tags: eoelab.org:1027/${{ gitea.repository }}:cuda_base tags: eoelab.org:1027/${{ gitea.repository }}:cuda_base
CUDA_Runtime: CUDA_Runtime:
@ -52,7 +53,6 @@ jobs:
ROCM: ROCM:
runs-on: runner runs-on: runner
needs: Base
steps: steps:
- name: checkout code - name: checkout code
uses: https://eoelab.org:1027/actions/checkout@v4 uses: https://eoelab.org:1027/actions/checkout@v4
@ -61,6 +61,7 @@ jobs:
with: with:
context: base/rocm context: base/rocm
build-args: | build-args: |
UBUNTU_MIRROR=mirrors.ustc.edu.cn
http_proxy=http://192.168.2.2:7890 http_proxy=http://192.168.2.2:7890
https_proxy=http://192.168.2.2:7890 https_proxy=http://192.168.2.2:7890
tags: eoelab.org:1027/${{ gitea.repository }}:rocm tags: eoelab.org:1027/${{ gitea.repository }}:rocm
@ -135,7 +136,7 @@ jobs:
- name: hexo build - name: hexo build
uses: https://eoelab.org:1027/actions/build-push-action@v6 uses: https://eoelab.org:1027/actions/build-push-action@v6
with: with:
context: Renv/hexo context: CI/hexo
tags: eoelab.org:1027/${{ gitea.repository }}:hexo tags: eoelab.org:1027/${{ gitea.repository }}:hexo
Python: Python:
@ -159,7 +160,7 @@ jobs:
- name: jupyterlite build - name: jupyterlite build
uses: https://eoelab.org:1027/actions/build-push-action@v6 uses: https://eoelab.org:1027/actions/build-push-action@v6
with: with:
context: Renv/jupyterlite context: CI/jupyterlite
tags: eoelab.org:1027/${{ gitea.repository }}:jupyterlite tags: eoelab.org:1027/${{ gitea.repository }}:jupyterlite
Julia: Julia:
@ -172,7 +173,6 @@ jobs:
uses: https://eoelab.org:1027/actions/build-push-action@v6 uses: https://eoelab.org:1027/actions/build-push-action@v6
with: with:
context: Program/julia context: Program/julia
build-args: JULIA_MIRROR=https://mirrors.cernet.edu.cn/julia
tags: eoelab.org:1027/${{ gitea.repository }}:julia tags: eoelab.org:1027/${{ gitea.repository }}:julia
R: R:
@ -264,7 +264,7 @@ jobs:
Steam_Wine: Steam_Wine:
runs-on: runner runs-on: runner
needs: Steam needs: Base
steps: steps:
- name: checkout code - name: checkout code
uses: https://eoelab.org:1027/actions/checkout@v4 uses: https://eoelab.org:1027/actions/checkout@v4
@ -274,18 +274,19 @@ jobs:
context: GS/steam/steam_wine context: GS/steam/steam_wine
tags: eoelab.org:1027/${{ gitea.repository }}:steam_wine tags: eoelab.org:1027/${{ gitea.repository }}:steam_wine
LLAMA: llama_cpu:
runs-on: runner runs-on: runner
needs: Base
steps: steps:
- name: checkout code - name: checkout code
uses: https://eoelab.org:1027/actions/checkout@v4 uses: https://eoelab.org:1027/actions/checkout@v4
- name: llama build - name: llama_cpu build
uses: https://eoelab.org:1027/actions/build-push-action@v6 uses: https://eoelab.org:1027/actions/build-push-action@v6
with: with:
context: Renv/llama context: llama/cpu
tags: eoelab.org:1027/${{ gitea.repository }}:llama build-args: |
http_proxy=http://192.168.2.2:7890
https_proxy=http://192.168.2.2:7890
tags: eoelab.org:1027/${{ gitea.repository }}:base
Push: Push:
runs-on: runner runs-on: runner

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:js FROM eoelab.org:1027/ben0i0d/cenv:js
RUN apt-get update --yes && apt-get install --yes --no-install-recommends git && apt-get clean && rm -rf /var/lib/apt/lists/* && \ RUN apt-get update --yes && apt-get install --yes --no-install-recommends git && apt-get clean && rm -rf /var/lib/apt/lists/* && \
npm install hexo-cli hexo-deployer-git -g && \ npm install hexo-cli hexo-deployer-git -g && \

View File

@ -0,0 +1,5 @@
FROM eoelab.org:1027/ben0i0d/cenv:python
RUN pip install jupyterlite-core && \
pip install jupyterlite-pyodide-kernel && \
pip cache purge

View File

@ -1 +1 @@
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:base AS builder FROM eoelab.org:1027/ben0i0d/cenv:base AS builder
USER root USER root
@ -7,7 +7,7 @@ RUN apt-get update --yes && apt-get install --yes gnupg curl && \
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 && \ 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 apt-get update --yes && apt-get install --yes --no-install-recommends zulu11-ca-jre-headless
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base
USER root USER root

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:base AS builder FROM eoelab.org:1027/ben0i0d/cenv:base AS builder
USER root USER root
@ -7,7 +7,7 @@ RUN apt-get update --yes && apt-get install --yes gnupg curl && \
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 && \ 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 apt-get update --yes && apt-get install --yes --no-install-recommends zulu17-ca-jre-headless
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base
USER root USER root

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:base AS builder FROM eoelab.org:1027/ben0i0d/cenv:base AS builder
USER root USER root
@ -7,7 +7,7 @@ RUN apt-get update --yes && apt-get install --yes gnupg curl && \
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 && \ 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 apt-get update --yes && apt-get install --yes --no-install-recommends zulu21-ca-jre-headless
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base
USER root USER root

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:base AS builder FROM eoelab.org:1027/ben0i0d/cenv:base AS builder
USER root USER root
@ -7,7 +7,7 @@ RUN apt-get update --yes && apt-get install --yes gnupg curl && \
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 && \ 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 apt-get update --yes && apt-get install --yes --no-install-recommends zulu8-ca-jre-headless
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base
USER root USER root

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:base AS builder FROM eoelab.org:1027/ben0i0d/cenv:base AS builder
USER root USER root
@ -16,7 +16,7 @@ RUN apt-get update --yes && apt-get install --yes xz-utils gnupg curl wget && \
tar -xvf node-v20.11.0-linux-x64.tar.xz && rm 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 cd mcsm && tar -zxf mcsmanager_linux_release.tar.gz && rm mcsmanager_linux_release.tar.gz
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base
EXPOSE 24444 EXPOSE 24444

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:base AS builder FROM eoelab.org:1027/ben0i0d/cenv:base AS builder
USER root USER root
@ -13,7 +13,7 @@ RUN apt-get update --yes && apt-get install --yes wget xz-utils && apt-get clean
tar -xvf node-v20.11.0-linux-x64.tar.xz && rm 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 cd mcsm && tar -zxf mcsmanager_linux_release.tar.gz && rm mcsmanager_linux_release.tar.gz
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base
EXPOSE 24445 EXPOSE 24445

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:base AS builder FROM eoelab.org:1027/ben0i0d/cenv:base AS builder
USER root USER root
@ -13,7 +13,7 @@ RUN apt-get update --yes && apt-get install --yes wget xz-utils && apt-get clean
tar -xvf node-v20.11.0-linux-x64.tar.xz && rm 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 cd mcsm && tar -zxf mcsmanager_linux_release.tar.gz && rm mcsmanager_linux_release.tar.gz
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base
EXPOSE 23333 EXPOSE 23333

View File

@ -1,18 +1,10 @@
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base
# Configure environment
ENV USER=steam \
UID=1000 \
GID=100 \
HOME="/home/steam"
RUN sed -i 's/main/main contrib non-free non-free-firmware/g' /etc/apt/sources.list.d/debian.sources && \ 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/question select "I AGREE" | debconf-set-selections && \
echo steam steam/license note '' | debconf-set-selections && \ echo steam steam/license note '' | debconf-set-selections && \
dpkg --add-architecture i386 && \ dpkg --add-architecture i386 && \
apt-get update --yes && apt-get install --yes steamcmd ca-certificates gosu && \ apt-get update --yes && apt-get install --yes steamcmd ca-certificates && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \ apt-get clean && rm -rf /var/lib/apt/lists/* && \
# Create user
useradd --no-log-init --create-home --shell /bin/bash --uid "${UID}" --no-user-group "${USER}" && \
ln -s /usr/games/steamcmd /usr/bin/steamcmd && \ ln -s /usr/games/steamcmd /usr/bin/steamcmd && \
steamcmd +login anonymous +quit steamcmd +login anonymous +quit

View File

@ -1,8 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:steam FROM eoelab.org:1027/ben0i0d/cenv:steam
USER root
RUN apt-get update --yes && apt-get install --yes --no-install-recommends wine && \ RUN apt-get update --yes && apt-get install --yes --no-install-recommends wine && \
apt-get clean && rm -rf /var/lib/apt/lists/* apt-get clean && rm -rf /var/lib/apt/lists/*
USER ${USER}

View File

@ -3,7 +3,7 @@
{ {
"name": "c", "name": "c",
"image": "ghcr.io/eoeair/cenv:c", "image": "docker.io/ben0i0d/cenv:c",
// Configure vscode-extensions. // Configure vscode-extensions.
"customizations": { "customizations": {

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base
USER root USER root

View File

@ -3,7 +3,7 @@
{ {
"name": "cpp", "name": "cpp",
"image": "ghcr.io/eoeair/cenv:cpp", "image": "docker.io/ben0i0d/cenv:cpp",
// Configure vscode-extensions. // Configure vscode-extensions.
"customizations": { "customizations": {

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base
USER root USER root

View File

@ -3,7 +3,7 @@
{ {
"name": "java", "name": "java",
"image": "ghcr.io/eoeair/cenv:java", "image": "docker.io/ben0i0d/cenv:java",
// Configure vscode-extensions. // Configure vscode-extensions.
"customizations": { "customizations": {

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base
USER root USER root

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base
USER root USER root

View File

@ -3,7 +3,7 @@
{ {
"name": "JS", "name": "JS",
"image": "ghcr.io/eoeair/cenv:js", "image": "docker.io/ben0i0d/cenv:js",
// Configure vscode-extensions. // Configure vscode-extensions.
"customizations": { "customizations": {

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:base 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/* && \ RUN apt-get update --yes && apt-get install --yes --no-install-recommends nodejs npm && apt-get clean && rm -rf /var/lib/apt/lists/* && \
npm config set registry https://registry.npmmirror.com npm config set registry https://registry.npmmirror.com

View File

@ -3,12 +3,12 @@
{ {
"name": "julia", "name": "julia",
"image": "ghcr.io/eoeair/cenv:julia", "image": "docker.io/ben0i0d/cenv:julia",
// Configure vscode-extensions. // Configure vscode-extensions.
"customizations": { "customizations": {
"vscode": { "vscode": {
"extensions": ["julialang.language-julia", "ms-toolsai.jupyter"] "extensions": ["julialang.language-julia"]
} }
} }
} }

View File

@ -1,16 +1,14 @@
FROM eoelab.org:1027/eoeair/cenv:python AS builder FROM eoelab.org:1027/ben0i0d/cenv:python AS builder
# install Julia packages in /opt/julias # install Julia packages in /opt/julias
RUN apt-get update --yes && apt-get install --yes --no-install-recommends gnupg && \ RUN apt-get update --yes && apt-get install --yes --no-install-recommends gnupg && \
pip install jill && jill install --confirm 1 pip install jill && jill install --confirm 1
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base
ARG JULIA_MIRROR
COPY --from=builder /opt/julias/ /opt/julias/ COPY --from=builder /opt/julias/ /opt/julias/
ENV JULIA_PKG_SERVER=${JULIA_MIRROR} \ ENV JULIA_PKG_SERVER=https://mirrors.ustc.edu.cn/julia \
JULIA_NUM_THREADS=8 JULIA_NUM_THREADS=8
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

View File

@ -3,7 +3,7 @@
{ {
"name": "python", "name": "python",
"image": "ghcr.io/eoeair/cenv:python", "image": "docker.io/ben0i0d/cenv:python",
// Configure vscode-extensions. // Configure vscode-extensions.
"customizations": { "customizations": {
"vscode": { "vscode": {

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base
USER root USER root

View File

@ -3,7 +3,7 @@
{ {
"name": "r", "name": "r",
"image": "ghcr.io/eoeair/cenv:r", "image": "docker.io/ben0i0d/cenv:r",
// Configure vscode-extensions. // Configure vscode-extensions.
"customizations": { "customizations": {

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:base FROM eoelab.org:1027/ben0i0d/cenv:base
USER root USER root

View File

@ -13,7 +13,7 @@ English | [中文](README_CN.md)
* CUDA : nvidia-container-toolkit/nvidia-docker2 * CUDA : nvidia-container-toolkit/nvidia-docker2
## Platform ## Platform
* OS : debian 13 * OS : debian 12 / ubuntu 24.04(ROCM only)
* ARCH : x86_64 * ARCH : x86_64
## Version ## Version
@ -29,16 +29,16 @@ English | [中文](README_CN.md)
## Image dependencies ## Image dependencies
* `Program` : development environment, primarily serving the devcontainer. * `Program` : development environment, primarily serving the devcontainer.
* `Renv` : Runtime environment * `CI` : CI job environment
* `GS` : game server * `GS` : game server
```mermaid ```mermaid
graph LR graph LR
CPU-->B{Base} CPU-->B{Base}
B-->CUDA CUDA-->B
B-->ROCM ROCM-->B
B-->C{Renv} B-->C{CI}
C-->CA(Hexo) C-->CA(Hexo)
C-->CB(Jupyterlite) C-->CB(Jupyterlite)

View File

@ -13,7 +13,7 @@ English | [中文](README_CN.md)
* CUDA : nvidia-container-toolkit/nvidia-docker2 * CUDA : nvidia-container-toolkit/nvidia-docker2
## 目标平台 ## 目标平台
* OS : debian 13 * OS : debian 12 / ubuntu 24.04只有ROCM
* ARCH : x86_64 * ARCH : x86_64
## 版本 ## 版本
@ -29,16 +29,16 @@ English | [中文](README_CN.md)
## 镜像依赖 ## 镜像依赖
* `Program`:开发环境主要为devcontainer * `Program`:开发环境主要为devcontainer
* `Renv`:运行时环境, * `CI`:CI作业环境,
* `GS`:游戏服务器 * `GS`:游戏服务器
```mermaid ```mermaid
graph LR graph LR
CPU-->B{Base} CPU-->B{Base}
B-->CUDA CUDA-->B
B-->ROCM ROCM-->B
B-->C{Renv} B-->C{CI}
C-->CA(Hexo) C-->CA(Hexo)
C-->CB(Jupyterlite) C-->CB(Jupyterlite)

View File

@ -1,10 +0,0 @@
FROM eoelab.org:1027/eoeair/cenv:python
EXPOSE 8000
WORKDIR /opt
RUN pip install jupyterlite-core jupyterlab_server jupyterlite-pyodide-kernel && pip cache purge && \
jupyter lite build
CMD [ "jupyter", "lite", "serve" ]

View File

@ -1,18 +0,0 @@
FROM eoelab.org:1027/eoeair/cenv:cpp AS builder
USER root
RUN apt-get update --yes && apt-get install --yes cmake build-essential git && \
git clone --depth 1 https://eoelab.org:1027/mirrors/llama.cpp.git && \
cd llama.cpp && \
cmake -B build -DBUILD_SHARED_LIBS=OFF && cmake --build build --config Release -j $(nproc) && \
mv build/bin/* /usr/local/bin/
FROM eoelab.org:1027/eoeair/cenv:base
EXPOSE 80
COPY --from=builder /usr/local/bin/llama-server /usr/local/bin/llama-server
RUN apt-get update --yes && apt-get install --yes --no-install-recommends libgomp1 && \
apt-get clean && rm -rf /var/lib/apt/lists/*

View File

@ -2,5 +2,5 @@
// For config options, see the README at: https://github.com/devcontainers/templates/tree/main/src/debian // For config options, see the README at: https://github.com/devcontainers/templates/tree/main/src/debian
{ {
"name": "base", "name": "base",
"image": "ghcr.io/eoeair/cenv:base" "image": "docker.io/ben0i0d/cenv:base"
} }

View File

@ -1,4 +1,6 @@
FROM eoelab.org:1027/eoeair/cenv:base FROM debian:bookworm-slim
ARG DEBIAN_MIRROR
ARG NV_CUDA_CUDART_VERSION=12.4.127-1 \ ARG NV_CUDA_CUDART_VERSION=12.4.127-1 \
NV_CUDA_COMPAT_PACKAGE=cuda-compat-12-4 \ NV_CUDA_COMPAT_PACKAGE=cuda-compat-12-4 \
@ -10,7 +12,8 @@ ENV NVIDIA_VISIBLE_DEVICES=all \
PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH} \ PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH} \
LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH} LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH}
RUN apt-get update && apt-get install -y --no-install-recommends gnupg2 curl ca-certificates && \ 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 && \ 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 &&\ 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 # # For libraries in the cuda-compat-* package: https://docs.nvidia.com/cuda/eula/index.html#attachment-a

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:cuda_runtime FROM eoelab.org:1027/ben0i0d/cenv:cuda_runtime
ARG NV_CUDA_LIB_VERSION=12.4.1-1 \ ARG NV_CUDA_LIB_VERSION=12.4.1-1 \
NV_CUDA_CUDART_DEV_VERSION=12.4.127-1 \ NV_CUDA_CUDART_DEV_VERSION=12.4.127-1 \

View File

@ -1,4 +1,4 @@
FROM eoelab.org:1027/eoeair/cenv:cuda_base FROM eoelab.org:1027/ben0i0d/cenv:cuda_base
ARG NV_CUDA_LIB_VERSION=12.4.1-1 \ ARG NV_CUDA_LIB_VERSION=12.4.1-1 \
NV_NVTX_VERSION=12.4.127-1 \ NV_NVTX_VERSION=12.4.127-1 \

View File

@ -2,6 +2,6 @@
// For config options, see the README at: https://github.com/devcontainers/templates/tree/main/src/debian // For config options, see the README at: https://github.com/devcontainers/templates/tree/main/src/debian
{ {
"name": "rocm", "name": "rocm",
"image": "eoelab.org:1027/eoeair/cenv:rocm", "image": "eoelab.org:1027/ben0i0d/cenv:rocm",
"runArgs": ["--device","/dev/kfd", "--device","/dev/dri", "--security-opt", "seccomp=unconfined", "--shm-size","4G"] "runArgs": ["--device","/dev/kfd", "--device","/dev/dri", "--security-opt", "seccomp=unconfined", "--shm-size","4G"]
} }

View File

@ -1,13 +1,25 @@
FROM eoelab.org:1027/eoeair/cenv:base FROM ubuntu:24.04
ARG VERSION=6.3.1 ARG UBUNTU_MIRROR
ENV PATH="${PATH}:/opt/rocm/bin" ARG VERSION=6.3
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget gnupg2 && \ ENV PATH="${PATH}:/opt/rocm/bin" \
wget https://repo.radeon.com/amdgpu-install/6.3.1/ubuntu/jammy/amdgpu-install_6.3.60301-1_all.deb && \ DEBIAN_FRONTEND=noninteractive
# add ROCm
apt-get install -y ./amdgpu-install_6.3.60301-1_all.deb && rm ./amdgpu-install_6.3.60301-1_all.deb && \ # 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 # Install ROCm-ml-libraries
apt-get update && apt-get update && apt-get install -y 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/* 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

25
llama/cpu/Dockerfile Normal file
View File

@ -0,0 +1,25 @@
FROM eoelab.org:1027/ben0i0d/cenv:base
USER root
RUN apt-get update --yes && apt-get install --yes gcc gdb cmake build-essential git libcurl4-openssl-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR "${HOME}"
# install llama
RUN git clone https://github.com/ggerganov/llama.cpp.git
WORKDIR /llama.cpp
RUN cmake -S . -B build -DGGML_BACKEND_DL=ON -DGGML_NATIVE=OFF -DGGML_CPU_ALL_VARIANTS=ON -DLLAMA_CURL=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF && \
cmake --build build -j $(nproc)
WORKDIR "${HOME}"
RUN mv /llama.cpp/build/bin/llama-server /usr/local/bin/llama-server && \
rm -rf /llama.cpp
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
ENTRYPOINT [ "llama-server" ]

View File

@ -2,8 +2,6 @@
# 定义旧镜像名称的前缀和新的命名规则 # 定义旧镜像名称的前缀和新的命名规则
OLD_PREFIX="eoelab.org:1027/eoeair" OLD_PREFIX="eoelab.org:1027/eoeair"
NEW_PREFIX="ghcr.io/eoeair" NEW_PREFIX="ghcr.io/eoeair"
# 删除不必要的镜像<none>
docker image prune -f
# 获取所有与旧前缀匹配的镜像,并进行重命名 # 获取所有与旧前缀匹配的镜像,并进行重命名
docker images --format "{{.Repository}}:{{.Tag}}" | grep "$OLD_PREFIX" | while read OLD_IMAGE; do docker images --format "{{.Repository}}:{{.Tag}}" | grep "$OLD_PREFIX" | while read OLD_IMAGE; do
NEW_IMAGE=${OLD_IMAGE/$OLD_PREFIX/$NEW_PREFIX} NEW_IMAGE=${OLD_IMAGE/$OLD_PREFIX/$NEW_PREFIX}