Download Dockerfile from britto224/test_ui: direct link, hf CLI and curl.
- Browser
- Download file 1.6 kB
-
https://huggingface.co/spaces/britto224/test_ui/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/britto224/test_ui/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/britto224/test_ui/resolve/main/Dockerfile
1.6 kB
| FROM python:3.10-slim | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| CONFIG_FILE=/app/conf.yaml | |
| # 1. Cài đặt các phụ thuộc hệ thống (Gộp Node.js vào đây để tối ưu) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| ffmpeg git git-lfs curl ca-certificates \ | |
| nodejs npm \ | |
| && rm -rf /var/lib/apt/lists/* && git lfs install | |
| # XÓA BỎ bước cài đặt Node Source 18.x và npm install -g vì gây lỗi build 404 | |
| # Hệ thống sẽ tự động dùng npx để chạy MCP servers lúc cần thiết. | |
| COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/ | |
| WORKDIR /app | |
| # 2. Sao chép mã nguồn và cấu hình | |
| COPY . /app | |
| COPY mcp_servers.json /app/ | |
| COPY local_tools.py /app/ | |
| # 3. Tạo thư mục và tải dữ liệu từ Hugging Face | |
| RUN mkdir -p /app/frontend/live2d-models \ | |
| /app/frontend/backgrounds \ | |
| /app/frontend/music | |
| RUN git clone https://huggingface.co/datasets/NopePrime/Open-LLM-Dataset /tmp/assets && \ | |
| cp -r /tmp/assets/live2d-models/* /app/frontend/live2d-models/ && \ | |
| cp -r /tmp/assets/backgrounds/* /app/frontend/backgrounds/ && \ | |
| cp -r /tmp/assets/music/* /app/frontend/music/ || true && \ | |
| rm -rf /tmp/assets | |
| # 4. Cài đặt các thư viện Python | |
| RUN uv pip install --system . | |
| # 5. Phân quyền người dùng | |
| RUN useradd -m -u 1000 user || true && \ | |
| chown -R user:user /app && \ | |
| chmod -R 775 /app | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["python", "run_server.py"] |