Download Dockerfile from simonu5/TriChat: direct link, hf CLI and curl.
- Browser
- Download file 1.32 kB
-
https://huggingface.co/spaces/simonu5/TriChat/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/simonu5/TriChat/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/simonu5/TriChat/resolve/main/Dockerfile
1.32 kB
| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 | |
| # Node.js 22(給 npx 類 MCP 伺服器 / 技能腳本)+ 常用工具 | |
| # LibreOffice 用來預覽 / 轉換 Office 文件;其他是開發常用工具 | |
| RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates git gnupg \ | |
| && curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \ | |
| && apt-get install -y --no-install-recommends nodejs \ | |
| build-essential pkg-config ffmpeg poppler-utils jq ripgrep sqlite3 zip unzip less procps \ | |
| libreoffice-writer-nogui libreoffice-calc-nogui libreoffice-impress-nogui \ | |
| fonts-noto-cjk fonts-noto-color-emoji fonts-dejavu \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt /tmp/requirements.txt | |
| # uv 提供 uvx(給 Python 類 MCP 伺服器) | |
| RUN pip install --upgrade pip && pip install -r /tmp/requirements.txt uv | |
| # HF Spaces 以 uid 1000 執行 | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| NPM_CONFIG_CACHE=/home/user/.npm \ | |
| WORKDIR=/home/user/workspace \ | |
| SKILLS_DIR=/home/user/skills | |
| WORKDIR /home/user/app | |
| COPY --chown=user . . | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--proxy-headers", "--forwarded-allow-ips", "*"] | |