unimernet-test / Dockerfile
abcd-hide's picture
Upload 2 files
361cea9 verified
Raw
History Blame Contribute Delete
871 Bytes
FROM python:3.10-slim
WORKDIR /app
# システム依存関係のインストール
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
git \
git-lfs \
&& rm -rf /var/lib/apt/lists/*
# Git LFSを有効化
RUN git lfs install
# モデルを事前にクローン(これによって「ファイルが見つからない」エラーを確実に回避します)
# wanderkid/unimernet_small を /app/unimernet_model に展開
RUN git clone https://huggingface.co/wanderkid/unimernet_small /app/unimernet_model
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# アプリケーションコードのコピー
COPY . .
# ポート番号(Hugging Face Spacesはデフォルトで7860を使用)
EXPOSE 7860
# アプリの起動
CMD ["uvicorn", "backend_unimer.py:app", "--host", "0.0.0.0", "--port", "7860"]