| FROM whatcanyousee/verl:ngc-cu124-vllm0.8.5-sglang0.4.6-mcore0.12.0-te2.3 | |
| # 安装额外依赖(如果基础镜像已包含部分依赖,pip 会自动跳过) | |
| RUN pip install --no-cache-dir \ | |
| fastapi \ | |
| uvicorn[standard] \ | |
| mbridge \ | |
| termcolor \ | |
| ipdb | |
| # 添加 Megatron-LM core_v0.12.2 | |
| RUN git clone -b core_v0.12.2 --depth 1 https://github.com/NVIDIA/Megatron-LM.git /opt/Megatron-LM | |
| # 复制代码至工作目录 | |
| WORKDIR /app | |
| COPY . /app | |
| # HF Spaces 默认通过 $PORT 注入端口 | |
| ENV PYTHONPATH=/opt/Megatron-LM:$PYTHONPATH | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # 启动 FastAPI 服务 | |
| CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port $PORT"] |