Spaces:
Runtime error
Runtime error
| # 使用官方的 Python 基礎映像 | |
| FROM python:3.10 | |
| # 安裝 Rust 和 Cargo | |
| RUN apt-get update && apt-get install -y curl \ | |
| && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh \ | |
| && source $HOME/.cargo/env | |
| # 安裝其他必要的依賴 | |
| RUN apt-get update && apt-get install -y git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1-mesa-glx | |
| # 設置工作目錄 | |
| WORKDIR /app | |
| # 複製 requirements.txt 到容器中 | |
| COPY requirements.txt . | |
| # 安裝 Python 依賴 | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 複製專案的其他檔案到容器中 | |
| COPY . . | |
| # 設定容器啟動後的指令 | |
| CMD ["python", "app.py"] | |