Team Ai
Apppublic

KernelPilot/KernelPilot-Optimization

sourceHugging Faceupdated 11mo agoView on Hugging Face
0likes
Dockerfile38 linesDownload Raw Back to root
1FROM nvidia/cuda:12.4.0-devel-ubuntu22.042 3ENV DEBIAN_FRONTEND=noninteractive4RUN apt-get update && \5    apt-get install -y --no-install-recommends wget ca-certificates && \6    wget -q https://developer.nvidia.com/downloads/assets/tools/secure/nsight-systems/2025_3/NsightSystems-linux-cli-public-2025.3.1.90-3582212.deb -O /tmp/nsys.deb && \7    apt-get install -y /tmp/nsys.deb && \8    rm -f /tmp/nsys.deb && \9    apt-get install -y python3.11 python3.11-distutils python3.11-dev python3-pip && \10    update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 && \11    python -m pip install --upgrade pip && \12    rm -rf /var/lib/apt/lists/*13 14RUN apt-get update && apt-get install -y gcc g++ build-essential && \15    python -m pip install --no-cache-dir nuitka16 17# 可选:创建非 root 用户18RUN useradd -m -u 1000 user19USER user20ENV PATH="/home/user/.local/bin:$PATH"21 22WORKDIR /app23 24# 安装 Python 依赖25COPY --chown=user requirements.txt .26RUN pip install --no-cache-dir -r requirements.txt27 28# 复制源码29COPY --chown=user app.py .30COPY --chown=user tool /app/tool31RUN chown -R user:user /app32 33# Gradio 默认监听 786034EXPOSE 786035 36# 直接启动 Python 脚本37CMD ["python", "app.py"]38