Download Dockerfile from jetlan/ems: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/spaces/jetlan/ems/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/jetlan/ems/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/jetlan/ems/resolve/main/Dockerfile
1.04 kB
| # 使用 Debian 系 Python 镜像,避开 Chainguard 的 apk/openssl 冲突 | |
| FROM python:3.13-slim | |
| # 安装系统依赖:Nginx、Supervisor 及编译 LiteLLM 可能需要的工具 | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| nginx \ | |
| supervisor \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 安装 LiteLLM Proxy | |
| # 注意:此处版本号需与你所需的安全版本对应,PyPI 版本可能与镜像标签不完全一致 | |
| RUN pip install --no-cache-dir "litellm[proxy]==1.83.14" | |
| # 清理 Nginx 默认站点,避免冲突 | |
| RUN rm -f /etc/nginx/sites-enabled/default | |
| # 复制你的配置文件 | |
| COPY litellm-config.yaml /app/config.yaml | |
| COPY nginx.conf /etc/nginx/conf.d/litellm.conf | |
| COPY supervisord.conf /etc/supervisor/conf.d/litellm-nginx.conf | |
| COPY index.html /usr/share/nginx/html/index.html | |
| WORKDIR /app | |
| # Nginx 对外暴露 80,LiteLLM 4000 仅内部使用 | |
| EXPOSE 10080 | |
| # 用 Supervisor 管理两个进程 | |
| CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf", "-n"] |