Spaces:
Running
Running
File size: 1,200 Bytes
02a7bf9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # Dockerfile
FROM python:3.10-slim
# ํ์ํ ํจํค์ง, ๊ฐ๋ฐ ๋๊ตฌ ๋ฐ git ์ค์น (root ๊ถํ)
RUN apt-get update && \
apt-get install -y tzdata build-essential libsm6 libxext6 libgl1 libglib2.0-0 git curl wget && \
ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime && \
echo "Asia/Seoul" > /etc/timezone && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# โ
์ค์: AdaFace ์ ์ฅ์ ํด๋ก ๋ฐ ๊ฐ์ค์น ๋ฏธ๋ฆฌ ๋ค์ด๋ก๋ (์๋ฒ ์์ ์๋ ์ต์ ํ)
RUN git clone https://github.com/mk-minchul/AdaFace.git /app/AdaFace
RUN python -c "from huggingface_hub import hf_hub_download; import shutil; cache_path = hf_hub_download(repo_id='VishalMishraTss/AdaFace', filename='adaface_ir101_webface12m.ckpt'); shutil.copy(cache_path, '/app/adaface_ir101_webface12m.ckpt')"
# ์ต์ข
์ฑ ์ฝ๋ ๋ณต์ฌ
COPY --chown=user . /app
# ์๋ฒ ์คํ ๋ช
๋ น (Hugging Face Spaces ๊ธฐ๋ณธ ํฌํธ 7860)
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |