kumay / Dockerfile
pcreem's picture
hi
5f72244
raw
history blame
599 Bytes
# 使用官方 Python 基礎映像
FROM python:3.10-slim
# 建立工作目錄
WORKDIR /home/user/app
# 安裝必要系統套件
RUN apt-get update && apt-get install -y \
git \
git-lfs \
ffmpeg \
libsm6 \
libxext6 \
libgl1-mesa-glx \
&& rm -rf /var/lib/apt/lists/* \
&& git lfs install
# 複製 requirements.txt 並安裝依賴(使用 CPU 版 Torch)
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
# 複製應用程式碼
COPY . .
# 預設啟動指令(讓 Gradio 自動啟動)
CMD ["python", "app.py"]