Spaces:
Sleeping
Sleeping
File size: 596 Bytes
9f03b39 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | FROM python:3.9-slim
# ๋ณด์ ๋ฐ ๊ถํ ์ค์ ์ ์ํ ์ ์ ์์ฑ (Hugging Face ๊ถ์ฅ ์ฌํญ)
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 pip && \
pip install --no-cache-dir -r requirements.txt
# ์ฝ๋ ๋ณต์ฌ (๋ชจ๋ธ ํ์ผ ํฌํจ)
COPY --chown=user . .
# ํฌํธ ์ค์ (Hugging Face๋ 7860 ํฌํธ๋ฅผ ์ฌ์ฉํฉ๋๋ค)
EXPOSE 7860
# ์คํ ๋ช
๋ น์ด
CMD ["uvicorn", "src.api:app", "--host", "0.0.0.0", "--port", "7860"]
|