Spaces:
Running
Running
Download Dockerfile from u5ername/markdown2ppt-docker: direct link, hf CLI and curl.
- Browser
- Download file 714 Bytes
-
https://huggingface.co/spaces/u5ername/markdown2ppt-docker/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/u5ername/markdown2ppt-docker/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/u5ername/markdown2ppt-docker/resolve/main/Dockerfile
714 Bytes
| # 使用 Python 基礎映像 | |
| FROM python:3.10-slim | |
| # 設置工作目錄 | |
| WORKDIR /app | |
| # 更新 apt 並安裝 Pandoc 和其他必要的套件 | |
| RUN apt-get update && \ | |
| apt-get install -y pandoc libreoffice python3-uno fonts-noto-cjk libreoffice-impress poppler-utils fonts-dejavu && \ | |
| apt-get clean && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # 先安裝鎖定版本,讓 Hugging Face rebuild 可重現。 | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 複製當前目錄下的檔案到容器中 | |
| COPY . /app | |
| # 開放 Gradio 預設的埠 | |
| EXPOSE 7860 | |
| # 設置環境變數 | |
| ENV GRADIO_SERVER_NAME="0.0.0.0" | |
| # 設置執行程式的命令 | |
| CMD ["python", "main.py"] | |